Class AttributeContext.Builder

java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder<MessageType,BuilderType>
com.google.protobuf.GeneratedMessageLite.Builder<AttributeContext,AttributeContext.Builder>
com.google.rpc.context.AttributeContext.Builder
All Implemented Interfaces:
com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, AttributeContextOrBuilder, Cloneable
Enclosing class:
AttributeContext

public static final class AttributeContext.Builder extends com.google.protobuf.GeneratedMessageLite.Builder<AttributeContext,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 Details

    • 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 [json_name = "origin"];
      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 [json_name = "origin"];
      Specified by:
      getOrigin in interface AttributeContextOrBuilder
      Returns:
      The origin.
    • setOrigin

       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 [json_name = "origin"];
    • 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 [json_name = "origin"];
    • 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 [json_name = "origin"];
    • 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 [json_name = "origin"];
    • 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 [json_name = "source"];
      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 [json_name = "source"];
      Specified by:
      getSource in interface AttributeContextOrBuilder
      Returns:
      The source.
    • setSource

       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 [json_name = "source"];
    • 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 [json_name = "source"];
    • 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 [json_name = "source"];
    • 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 [json_name = "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 [json_name = "destination"];
      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 [json_name = "destination"];
      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 [json_name = "destination"];
    • 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 [json_name = "destination"];
    • 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 [json_name = "destination"];
    • 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 [json_name = "destination"];
    • hasRequest

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

      public AttributeContext.Request getRequest()
       Represents a network request, such as an HTTP request.
       
      .google.rpc.context.AttributeContext.Request request = 3 [json_name = "request"];
      Specified by:
      getRequest in interface AttributeContextOrBuilder
      Returns:
      The request.
    • setRequest

       Represents a network request, such as an HTTP request.
       
      .google.rpc.context.AttributeContext.Request request = 3 [json_name = "request"];
    • setRequest

      public AttributeContext.Builder setRequest(AttributeContext.Request.Builder builderForValue)
       Represents a network request, such as an HTTP request.
       
      .google.rpc.context.AttributeContext.Request request = 3 [json_name = "request"];
    • mergeRequest

       Represents a network request, such as an HTTP request.
       
      .google.rpc.context.AttributeContext.Request request = 3 [json_name = "request"];
    • clearRequest

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

      public boolean hasResponse()
       Represents a network response, such as an HTTP response.
       
      .google.rpc.context.AttributeContext.Response response = 4 [json_name = "response"];
      Specified by:
      hasResponse in interface AttributeContextOrBuilder
      Returns:
      Whether the response field is set.
    • getResponse

      public AttributeContext.Response getResponse()
       Represents a network response, such as an HTTP response.
       
      .google.rpc.context.AttributeContext.Response response = 4 [json_name = "response"];
      Specified by:
      getResponse in interface AttributeContextOrBuilder
      Returns:
      The response.
    • setResponse

       Represents a network response, such as an HTTP response.
       
      .google.rpc.context.AttributeContext.Response response = 4 [json_name = "response"];
    • setResponse

      public AttributeContext.Builder setResponse(AttributeContext.Response.Builder builderForValue)
       Represents a network response, such as an HTTP response.
       
      .google.rpc.context.AttributeContext.Response response = 4 [json_name = "response"];
    • mergeResponse

       Represents a network response, such as an HTTP response.
       
      .google.rpc.context.AttributeContext.Response response = 4 [json_name = "response"];
    • clearResponse

      public AttributeContext.Builder clearResponse()
       Represents a network response, such as an HTTP response.
       
      .google.rpc.context.AttributeContext.Response response = 4 [json_name = "response"];
    • 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 [json_name = "resource"];
      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 [json_name = "resource"];
      Specified by:
      getResource in interface AttributeContextOrBuilder
      Returns:
      The resource.
    • setResource

       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 [json_name = "resource"];
    • 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 [json_name = "resource"];
    • mergeResource

       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 [json_name = "resource"];
    • 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 [json_name = "resource"];
    • hasApi

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

      public AttributeContext.Api getApi()
       Represents an API operation that is involved to a network activity.
       
      .google.rpc.context.AttributeContext.Api api = 6 [json_name = "api"];
      Specified by:
      getApi in interface AttributeContextOrBuilder
      Returns:
      The api.
    • setApi

       Represents an API operation that is involved to a network activity.
       
      .google.rpc.context.AttributeContext.Api api = 6 [json_name = "api"];
    • setApi

      public AttributeContext.Builder setApi(AttributeContext.Api.Builder builderForValue)
       Represents an API operation that is involved to a network activity.
       
      .google.rpc.context.AttributeContext.Api api = 6 [json_name = "api"];
    • mergeApi

       Represents an API operation that is involved to a network activity.
       
      .google.rpc.context.AttributeContext.Api api = 6 [json_name = "api"];
    • clearApi

      public AttributeContext.Builder clearApi()
       Represents an API operation that is involved to a network activity.
       
      .google.rpc.context.AttributeContext.Api api = 6 [json_name = "api"];
    • 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 [json_name = "extensions"];
      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 [json_name = "extensions"];
      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 [json_name = "extensions"];
      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 [json_name = "extensions"];
    • 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 [json_name = "extensions"];
    • 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 [json_name = "extensions"];
    • 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 [json_name = "extensions"];
    • 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 [json_name = "extensions"];
    • 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 [json_name = "extensions"];
    • 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 [json_name = "extensions"];
    • clearExtensions

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

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