Class AttributeContext.Builder

  • All Implemented Interfaces:
    com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, AttributeContextOrBuilder, Cloneable
    Enclosing class:
    AttributeContext

    public static final class AttributeContext.Builder
    extends com.google.protobuf.GeneratedMessageV3.Builder<AttributeContext.Builder>
    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
    • Method Detail

      • getDescriptor

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

        protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
        Specified by:
        internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessageV3.Builder<AttributeContext.Builder>
      • clear

        public AttributeContext.Builder clear()
        Specified by:
        clear in interface com.google.protobuf.Message.Builder
        Specified by:
        clear in interface com.google.protobuf.MessageLite.Builder
        Overrides:
        clear in class com.google.protobuf.GeneratedMessageV3.Builder<AttributeContext.Builder>
      • getDescriptorForType

        public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
        Specified by:
        getDescriptorForType in interface com.google.protobuf.Message.Builder
        Specified by:
        getDescriptorForType in interface com.google.protobuf.MessageOrBuilder
        Overrides:
        getDescriptorForType in class com.google.protobuf.GeneratedMessageV3.Builder<AttributeContext.Builder>
      • getDefaultInstanceForType

        public AttributeContext getDefaultInstanceForType()
        Specified by:
        getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
        Specified by:
        getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder
      • build

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

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

        public AttributeContext.Builder clone()
        Specified by:
        clone in interface com.google.protobuf.Message.Builder
        Specified by:
        clone in interface com.google.protobuf.MessageLite.Builder
        Overrides:
        clone in class com.google.protobuf.GeneratedMessageV3.Builder<AttributeContext.Builder>
      • setField

        public AttributeContext.Builder setField​(com.google.protobuf.Descriptors.FieldDescriptor field,
                                                 Object value)
        Specified by:
        setField in interface com.google.protobuf.Message.Builder
        Overrides:
        setField in class com.google.protobuf.GeneratedMessageV3.Builder<AttributeContext.Builder>
      • clearField

        public AttributeContext.Builder clearField​(com.google.protobuf.Descriptors.FieldDescriptor field)
        Specified by:
        clearField in interface com.google.protobuf.Message.Builder
        Overrides:
        clearField in class com.google.protobuf.GeneratedMessageV3.Builder<AttributeContext.Builder>
      • clearOneof

        public AttributeContext.Builder clearOneof​(com.google.protobuf.Descriptors.OneofDescriptor oneof)
        Specified by:
        clearOneof in interface com.google.protobuf.Message.Builder
        Overrides:
        clearOneof in class com.google.protobuf.GeneratedMessageV3.Builder<AttributeContext.Builder>
      • setRepeatedField

        public AttributeContext.Builder setRepeatedField​(com.google.protobuf.Descriptors.FieldDescriptor field,
                                                         int index,
                                                         Object value)
        Specified by:
        setRepeatedField in interface com.google.protobuf.Message.Builder
        Overrides:
        setRepeatedField in class com.google.protobuf.GeneratedMessageV3.Builder<AttributeContext.Builder>
      • addRepeatedField

        public AttributeContext.Builder addRepeatedField​(com.google.protobuf.Descriptors.FieldDescriptor field,
                                                         Object value)
        Specified by:
        addRepeatedField in interface com.google.protobuf.Message.Builder
        Overrides:
        addRepeatedField in class com.google.protobuf.GeneratedMessageV3.Builder<AttributeContext.Builder>
      • mergeFrom

        public AttributeContext.Builder mergeFrom​(com.google.protobuf.Message other)
        Specified by:
        mergeFrom in interface com.google.protobuf.Message.Builder
        Overrides:
        mergeFrom in class com.google.protobuf.AbstractMessage.Builder<AttributeContext.Builder>
      • isInitialized

        public final boolean isInitialized()
        Specified by:
        isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
        Overrides:
        isInitialized in class com.google.protobuf.GeneratedMessageV3.Builder<AttributeContext.Builder>
      • mergeFrom

        public AttributeContext.Builder mergeFrom​(com.google.protobuf.CodedInputStream input,
                                                  com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                                           throws IOException
        Specified by:
        mergeFrom in interface com.google.protobuf.Message.Builder
        Specified by:
        mergeFrom in interface com.google.protobuf.MessageLite.Builder
        Overrides:
        mergeFrom in class com.google.protobuf.AbstractMessage.Builder<AttributeContext.Builder>
        Throws:
        IOException
      • 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.
      • setOrigin

        public AttributeContext.Builder setOrigin​(AttributeContext.Peer value)
         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;
      • setOrigin

        public AttributeContext.Builder setOrigin​(AttributeContext.Peer.Builder builderForValue)
         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;
      • mergeOrigin

        public AttributeContext.Builder mergeOrigin​(AttributeContext.Peer value)
         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;
      • clearOrigin

        public AttributeContext.Builder clearOrigin()
         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;
      • getOriginBuilder

        public AttributeContext.Peer.Builder getOriginBuilder()
         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;
      • 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.
      • setSource

        public AttributeContext.Builder setSource​(AttributeContext.Peer value)
         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;
      • setSource

        public AttributeContext.Builder setSource​(AttributeContext.Peer.Builder builderForValue)
         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;
      • mergeSource

        public AttributeContext.Builder mergeSource​(AttributeContext.Peer value)
         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;
      • clearSource

        public AttributeContext.Builder clearSource()
         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;
      • getSourceBuilder

        public AttributeContext.Peer.Builder getSourceBuilder()
         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;
      • 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.
      • setDestination

        public AttributeContext.Builder setDestination​(AttributeContext.Peer value)
         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;
      • setDestination

        public AttributeContext.Builder setDestination​(AttributeContext.Peer.Builder builderForValue)
         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;
      • mergeDestination

        public AttributeContext.Builder mergeDestination​(AttributeContext.Peer value)
         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;
      • clearDestination

        public AttributeContext.Builder clearDestination()
         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;
      • getDestinationBuilder

        public AttributeContext.Peer.Builder getDestinationBuilder()
         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;
      • 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.
      • clearRequest

        public AttributeContext.Builder clearRequest()
         Represents a network request, such as an HTTP request.
         
        .google.rpc.context.AttributeContext.Request request = 3;
      • getRequestBuilder

        public AttributeContext.Request.Builder getRequestBuilder()
         Represents a network request, such as an HTTP request.
         
        .google.rpc.context.AttributeContext.Request request = 3;
      • 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.
      • clearResponse

        public AttributeContext.Builder clearResponse()
         Represents a network response, such as an HTTP response.
         
        .google.rpc.context.AttributeContext.Response response = 4;
      • getResponseBuilder

        public AttributeContext.Response.Builder getResponseBuilder()
         Represents a network response, such as an HTTP response.
         
        .google.rpc.context.AttributeContext.Response response = 4;
      • 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.
      • setResource

        public AttributeContext.Builder setResource​(AttributeContext.Resource value)
         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;
      • setResource

        public AttributeContext.Builder setResource​(AttributeContext.Resource.Builder builderForValue)
         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;
      • mergeResource

        public AttributeContext.Builder mergeResource​(AttributeContext.Resource value)
         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;
      • clearResource

        public AttributeContext.Builder clearResource()
         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;
      • getResourceBuilder

        public AttributeContext.Resource.Builder getResourceBuilder()
         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;
      • 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.
      • clearApi

        public AttributeContext.Builder clearApi()
         Represents an API operation that is involved to a network activity.
         
        .google.rpc.context.AttributeContext.Api api = 6;
      • getApiBuilder

        public AttributeContext.Api.Builder getApiBuilder()
         Represents an API operation that is involved to a network activity.
         
        .google.rpc.context.AttributeContext.Api api = 6;
      • getExtensionsList

        public 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
      • 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
      • setExtensions

        public AttributeContext.Builder setExtensions​(int index,
                                                      com.google.protobuf.Any value)
         Supports extensions for advanced use cases, such as logs and metrics.
         
        repeated .google.protobuf.Any extensions = 8;
      • setExtensions

        public AttributeContext.Builder setExtensions​(int index,
                                                      com.google.protobuf.Any.Builder builderForValue)
         Supports extensions for advanced use cases, such as logs and metrics.
         
        repeated .google.protobuf.Any extensions = 8;
      • addExtensions

        public AttributeContext.Builder addExtensions​(com.google.protobuf.Any value)
         Supports extensions for advanced use cases, such as logs and metrics.
         
        repeated .google.protobuf.Any extensions = 8;
      • addExtensions

        public AttributeContext.Builder addExtensions​(int index,
                                                      com.google.protobuf.Any value)
         Supports extensions for advanced use cases, such as logs and metrics.
         
        repeated .google.protobuf.Any extensions = 8;
      • addExtensions

        public AttributeContext.Builder addExtensions​(com.google.protobuf.Any.Builder builderForValue)
         Supports extensions for advanced use cases, such as logs and metrics.
         
        repeated .google.protobuf.Any extensions = 8;
      • addExtensions

        public AttributeContext.Builder addExtensions​(int index,
                                                      com.google.protobuf.Any.Builder builderForValue)
         Supports extensions for advanced use cases, such as logs and metrics.
         
        repeated .google.protobuf.Any extensions = 8;
      • addAllExtensions

        public AttributeContext.Builder addAllExtensions​(Iterable<? extends com.google.protobuf.Any> values)
         Supports extensions for advanced use cases, such as logs and metrics.
         
        repeated .google.protobuf.Any extensions = 8;
      • clearExtensions

        public AttributeContext.Builder clearExtensions()
         Supports extensions for advanced use cases, such as logs and metrics.
         
        repeated .google.protobuf.Any extensions = 8;
      • removeExtensions

        public AttributeContext.Builder removeExtensions​(int index)
         Supports extensions for advanced use cases, such as logs and metrics.
         
        repeated .google.protobuf.Any extensions = 8;
      • getExtensionsBuilder

        public com.google.protobuf.Any.Builder getExtensionsBuilder​(int index)
         Supports extensions for advanced use cases, such as logs and metrics.
         
        repeated .google.protobuf.Any extensions = 8;
      • 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
      • getExtensionsOrBuilderList

        public 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
      • addExtensionsBuilder

        public com.google.protobuf.Any.Builder addExtensionsBuilder()
         Supports extensions for advanced use cases, such as logs and metrics.
         
        repeated .google.protobuf.Any extensions = 8;
      • addExtensionsBuilder

        public com.google.protobuf.Any.Builder addExtensionsBuilder​(int index)
         Supports extensions for advanced use cases, such as logs and metrics.
         
        repeated .google.protobuf.Any extensions = 8;
      • getExtensionsBuilderList

        public List<com.google.protobuf.Any.Builder> getExtensionsBuilderList()
         Supports extensions for advanced use cases, such as logs and metrics.
         
        repeated .google.protobuf.Any extensions = 8;
      • setUnknownFields

        public final AttributeContext.Builder setUnknownFields​(com.google.protobuf.UnknownFieldSet unknownFields)
        Specified by:
        setUnknownFields in interface com.google.protobuf.Message.Builder
        Overrides:
        setUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<AttributeContext.Builder>
      • mergeUnknownFields

        public final AttributeContext.Builder mergeUnknownFields​(com.google.protobuf.UnknownFieldSet unknownFields)
        Specified by:
        mergeUnknownFields in interface com.google.protobuf.Message.Builder
        Overrides:
        mergeUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<AttributeContext.Builder>