Class RateLimit.Action.RequestHeaders.Builder

  • All Implemented Interfaces:
    com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, RateLimit.Action.RequestHeadersOrBuilder, java.lang.Cloneable
    Enclosing class:
    RateLimit.Action.RequestHeaders

    public static final class RateLimit.Action.RequestHeaders.Builder
    extends com.google.protobuf.GeneratedMessage.Builder<RateLimit.Action.RequestHeaders.Builder>
    implements RateLimit.Action.RequestHeadersOrBuilder
     The following descriptor entry is appended when a header contains a key that matches the
     ``header_name``:
    
     .. code-block:: cpp
    
     ("<descriptor_key>", "<header_value_queried_from_header>")
     
    Protobuf type envoy.config.route.v3.RateLimit.Action.RequestHeaders
    • Field Detail

      • bitField0_

        private int bitField0_
      • headerName_

        private java.lang.Object headerName_
      • descriptorKey_

        private java.lang.Object descriptorKey_
      • skipIfAbsent_

        private boolean skipIfAbsent_
    • Constructor Detail

      • Builder

        private Builder()
      • Builder

        private Builder​(com.google.protobuf.AbstractMessage.BuilderParent parent)
    • Method Detail

      • getDescriptor

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

        protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
        Specified by:
        internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessage.Builder<RateLimit.Action.RequestHeaders.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.GeneratedMessage.Builder<RateLimit.Action.RequestHeaders.Builder>
      • getDefaultInstanceForType

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

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

        public RateLimit.Action.RequestHeaders buildPartial()
        Specified by:
        buildPartial in interface com.google.protobuf.Message.Builder
        Specified by:
        buildPartial in interface com.google.protobuf.MessageLite.Builder
      • isInitialized

        public final boolean isInitialized()
        Specified by:
        isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
        Overrides:
        isInitialized in class com.google.protobuf.GeneratedMessage.Builder<RateLimit.Action.RequestHeaders.Builder>
      • mergeFrom

        public RateLimit.Action.RequestHeaders.Builder mergeFrom​(com.google.protobuf.CodedInputStream input,
                                                                 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                                                          throws java.io.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<RateLimit.Action.RequestHeaders.Builder>
        Throws:
        java.io.IOException
      • getHeaderName

        public java.lang.String getHeaderName()
         The header name to be queried from the request headers. The header’s
         value is used to populate the value of the descriptor entry for the
         descriptor_key.
         
        string header_name = 1 [(.validate.rules) = { ... }
        Specified by:
        getHeaderName in interface RateLimit.Action.RequestHeadersOrBuilder
        Returns:
        The headerName.
      • getHeaderNameBytes

        public com.google.protobuf.ByteString getHeaderNameBytes()
         The header name to be queried from the request headers. The header’s
         value is used to populate the value of the descriptor entry for the
         descriptor_key.
         
        string header_name = 1 [(.validate.rules) = { ... }
        Specified by:
        getHeaderNameBytes in interface RateLimit.Action.RequestHeadersOrBuilder
        Returns:
        The bytes for headerName.
      • setHeaderName

        public RateLimit.Action.RequestHeaders.Builder setHeaderName​(java.lang.String value)
         The header name to be queried from the request headers. The header’s
         value is used to populate the value of the descriptor entry for the
         descriptor_key.
         
        string header_name = 1 [(.validate.rules) = { ... }
        Parameters:
        value - The headerName to set.
        Returns:
        This builder for chaining.
      • clearHeaderName

        public RateLimit.Action.RequestHeaders.Builder clearHeaderName()
         The header name to be queried from the request headers. The header’s
         value is used to populate the value of the descriptor entry for the
         descriptor_key.
         
        string header_name = 1 [(.validate.rules) = { ... }
        Returns:
        This builder for chaining.
      • setHeaderNameBytes

        public RateLimit.Action.RequestHeaders.Builder setHeaderNameBytes​(com.google.protobuf.ByteString value)
         The header name to be queried from the request headers. The header’s
         value is used to populate the value of the descriptor entry for the
         descriptor_key.
         
        string header_name = 1 [(.validate.rules) = { ... }
        Parameters:
        value - The bytes for headerName to set.
        Returns:
        This builder for chaining.
      • getDescriptorKeyBytes

        public com.google.protobuf.ByteString getDescriptorKeyBytes()
         The key to use in the descriptor entry.
         
        string descriptor_key = 2 [(.validate.rules) = { ... }
        Specified by:
        getDescriptorKeyBytes in interface RateLimit.Action.RequestHeadersOrBuilder
        Returns:
        The bytes for descriptorKey.
      • setDescriptorKey

        public RateLimit.Action.RequestHeaders.Builder setDescriptorKey​(java.lang.String value)
         The key to use in the descriptor entry.
         
        string descriptor_key = 2 [(.validate.rules) = { ... }
        Parameters:
        value - The descriptorKey to set.
        Returns:
        This builder for chaining.
      • clearDescriptorKey

        public RateLimit.Action.RequestHeaders.Builder clearDescriptorKey()
         The key to use in the descriptor entry.
         
        string descriptor_key = 2 [(.validate.rules) = { ... }
        Returns:
        This builder for chaining.
      • setDescriptorKeyBytes

        public RateLimit.Action.RequestHeaders.Builder setDescriptorKeyBytes​(com.google.protobuf.ByteString value)
         The key to use in the descriptor entry.
         
        string descriptor_key = 2 [(.validate.rules) = { ... }
        Parameters:
        value - The bytes for descriptorKey to set.
        Returns:
        This builder for chaining.
      • getSkipIfAbsent

        public boolean getSkipIfAbsent()
         If set to true, Envoy skips the descriptor while calling rate limiting service
         when header is not present in the request. By default it skips calling the
         rate limiting service if this header is not present in the request.
         
        bool skip_if_absent = 3;
        Specified by:
        getSkipIfAbsent in interface RateLimit.Action.RequestHeadersOrBuilder
        Returns:
        The skipIfAbsent.
      • setSkipIfAbsent

        public RateLimit.Action.RequestHeaders.Builder setSkipIfAbsent​(boolean value)
         If set to true, Envoy skips the descriptor while calling rate limiting service
         when header is not present in the request. By default it skips calling the
         rate limiting service if this header is not present in the request.
         
        bool skip_if_absent = 3;
        Parameters:
        value - The skipIfAbsent to set.
        Returns:
        This builder for chaining.
      • clearSkipIfAbsent

        public RateLimit.Action.RequestHeaders.Builder clearSkipIfAbsent()
         If set to true, Envoy skips the descriptor while calling rate limiting service
         when header is not present in the request. By default it skips calling the
         rate limiting service if this header is not present in the request.
         
        bool skip_if_absent = 3;
        Returns:
        This builder for chaining.