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
     An attribute is a piece of metadata that describes an activity on a network.
     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
     of the `AttributeContext`. The `AttributeContext` is a collection of individual attributes
     supported by Envoy authorization system.
     [#comment: The following items are left out of this proto
     Request.Auth field for jwt tokens
     Request.Api for api management
     Origin peer that originated the request
     Caching Protocol
     request_context return values to inject back into the filter chain
     peer.claims -- from X.509 extensions
     Configuration
     - field mask to send
     - which return values from request_context are copied back
     - which return values are copied into request_headers]
     [#next-free-field: 12]
     
    Protobuf type envoy.service.auth.v2.AttributeContext
    • Method Detail

      • getDescriptor

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

        protected com.google.protobuf.MapField internalGetMapField​(int number)
        Overrides:
        internalGetMapField in class com.google.protobuf.GeneratedMessageV3.Builder<AttributeContext.Builder>
      • internalGetMutableMapField

        protected com.google.protobuf.MapField internalGetMutableMapField​(int number)
        Overrides:
        internalGetMutableMapField in class com.google.protobuf.GeneratedMessageV3.Builder<AttributeContext.Builder>
      • 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
      • 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.
         
        .envoy.service.auth.v2.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.
         
        .envoy.service.auth.v2.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.
         
        .envoy.service.auth.v2.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.
         
        .envoy.service.auth.v2.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.
         
        .envoy.service.auth.v2.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.
         
        .envoy.service.auth.v2.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.
         
        .envoy.service.auth.v2.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.
         
        .envoy.service.auth.v2.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.
         
        .envoy.service.auth.v2.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.
         
        .envoy.service.auth.v2.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.
         
        .envoy.service.auth.v2.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.
         
        .envoy.service.auth.v2.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.
         
        .envoy.service.auth.v2.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.
         
        .envoy.service.auth.v2.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.
         
        .envoy.service.auth.v2.AttributeContext.Peer destination = 2;
        Specified by:
        getDestinationOrBuilder in interface AttributeContextOrBuilder
      • hasRequest

        public boolean hasRequest()
         Represents a network request, such as an HTTP request.
         
        .envoy.service.auth.v2.AttributeContext.Request request = 4;
        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.
         
        .envoy.service.auth.v2.AttributeContext.Request request = 4;
      • getRequestBuilder

        public AttributeContext.Request.Builder getRequestBuilder()
         Represents a network request, such as an HTTP request.
         
        .envoy.service.auth.v2.AttributeContext.Request request = 4;
      • getContextExtensionsCount

        public int getContextExtensionsCount()
        Description copied from interface: AttributeContextOrBuilder
         This is analogous to http_request.headers, however these contents will not be sent to the
         upstream server. Context_extensions provide an extension mechanism for sending additional
         information to the auth server without modifying the proto definition. It maps to the
         internal opaque context in the filter chain.
         
        map<string, string> context_extensions = 10;
        Specified by:
        getContextExtensionsCount in interface AttributeContextOrBuilder
      • containsContextExtensions

        public boolean containsContextExtensions​(String key)
         This is analogous to http_request.headers, however these contents will not be sent to the
         upstream server. Context_extensions provide an extension mechanism for sending additional
         information to the auth server without modifying the proto definition. It maps to the
         internal opaque context in the filter chain.
         
        map<string, string> context_extensions = 10;
        Specified by:
        containsContextExtensions in interface AttributeContextOrBuilder
      • getContextExtensionsMap

        public Map<String,​String> getContextExtensionsMap()
         This is analogous to http_request.headers, however these contents will not be sent to the
         upstream server. Context_extensions provide an extension mechanism for sending additional
         information to the auth server without modifying the proto definition. It maps to the
         internal opaque context in the filter chain.
         
        map<string, string> context_extensions = 10;
        Specified by:
        getContextExtensionsMap in interface AttributeContextOrBuilder
      • getContextExtensionsOrDefault

        public String getContextExtensionsOrDefault​(String key,
                                                    String defaultValue)
         This is analogous to http_request.headers, however these contents will not be sent to the
         upstream server. Context_extensions provide an extension mechanism for sending additional
         information to the auth server without modifying the proto definition. It maps to the
         internal opaque context in the filter chain.
         
        map<string, string> context_extensions = 10;
        Specified by:
        getContextExtensionsOrDefault in interface AttributeContextOrBuilder
      • getContextExtensionsOrThrow

        public String getContextExtensionsOrThrow​(String key)
         This is analogous to http_request.headers, however these contents will not be sent to the
         upstream server. Context_extensions provide an extension mechanism for sending additional
         information to the auth server without modifying the proto definition. It maps to the
         internal opaque context in the filter chain.
         
        map<string, string> context_extensions = 10;
        Specified by:
        getContextExtensionsOrThrow in interface AttributeContextOrBuilder
      • removeContextExtensions

        public AttributeContext.Builder removeContextExtensions​(String key)
         This is analogous to http_request.headers, however these contents will not be sent to the
         upstream server. Context_extensions provide an extension mechanism for sending additional
         information to the auth server without modifying the proto definition. It maps to the
         internal opaque context in the filter chain.
         
        map<string, string> context_extensions = 10;
      • getMutableContextExtensions

        @Deprecated
        public Map<String,​String> getMutableContextExtensions()
        Deprecated.
        Use alternate mutation accessors instead.
      • putContextExtensions

        public AttributeContext.Builder putContextExtensions​(String key,
                                                             String value)
         This is analogous to http_request.headers, however these contents will not be sent to the
         upstream server. Context_extensions provide an extension mechanism for sending additional
         information to the auth server without modifying the proto definition. It maps to the
         internal opaque context in the filter chain.
         
        map<string, string> context_extensions = 10;
      • putAllContextExtensions

        public AttributeContext.Builder putAllContextExtensions​(Map<String,​String> values)
         This is analogous to http_request.headers, however these contents will not be sent to the
         upstream server. Context_extensions provide an extension mechanism for sending additional
         information to the auth server without modifying the proto definition. It maps to the
         internal opaque context in the filter chain.
         
        map<string, string> context_extensions = 10;
      • hasMetadataContext

        public boolean hasMetadataContext()
         Dynamic metadata associated with the request.
         
        .envoy.api.v2.core.Metadata metadata_context = 11;
        Specified by:
        hasMetadataContext in interface AttributeContextOrBuilder
        Returns:
        Whether the metadataContext field is set.
      • getMetadataContext

        public Metadata getMetadataContext()
         Dynamic metadata associated with the request.
         
        .envoy.api.v2.core.Metadata metadata_context = 11;
        Specified by:
        getMetadataContext in interface AttributeContextOrBuilder
        Returns:
        The metadataContext.
      • setMetadataContext

        public AttributeContext.Builder setMetadataContext​(Metadata value)
         Dynamic metadata associated with the request.
         
        .envoy.api.v2.core.Metadata metadata_context = 11;
      • setMetadataContext

        public AttributeContext.Builder setMetadataContext​(Metadata.Builder builderForValue)
         Dynamic metadata associated with the request.
         
        .envoy.api.v2.core.Metadata metadata_context = 11;
      • mergeMetadataContext

        public AttributeContext.Builder mergeMetadataContext​(Metadata value)
         Dynamic metadata associated with the request.
         
        .envoy.api.v2.core.Metadata metadata_context = 11;
      • clearMetadataContext

        public AttributeContext.Builder clearMetadataContext()
         Dynamic metadata associated with the request.
         
        .envoy.api.v2.core.Metadata metadata_context = 11;
      • getMetadataContextBuilder

        public Metadata.Builder getMetadataContextBuilder()
         Dynamic metadata associated with the request.
         
        .envoy.api.v2.core.Metadata metadata_context = 11;
      • 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>