Class RateLimit.Builder

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

    public static final class RateLimit.Builder
    extends com.google.protobuf.GeneratedMessageV3.Builder<RateLimit.Builder>
    implements RateLimitOrBuilder
     [#next-free-field: 8]
     
    Protobuf type envoy.config.filter.http.rate_limit.v2.RateLimit
    • 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<RateLimit.Builder>
      • clear

        public RateLimit.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<RateLimit.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<RateLimit.Builder>
      • getDefaultInstanceForType

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

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

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

        public RateLimit.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<RateLimit.Builder>
      • setField

        public RateLimit.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<RateLimit.Builder>
      • clearField

        public RateLimit.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<RateLimit.Builder>
      • clearOneof

        public RateLimit.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<RateLimit.Builder>
      • setRepeatedField

        public RateLimit.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<RateLimit.Builder>
      • addRepeatedField

        public RateLimit.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<RateLimit.Builder>
      • mergeFrom

        public RateLimit.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<RateLimit.Builder>
      • isInitialized

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

        public RateLimit.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<RateLimit.Builder>
        Throws:
        IOException
      • getDomain

        public String getDomain()
         The rate limit domain to use when calling the rate limit service.
         
        string domain = 1 [(.validate.rules) = { ... }
        Specified by:
        getDomain in interface RateLimitOrBuilder
        Returns:
        The domain.
      • getDomainBytes

        public com.google.protobuf.ByteString getDomainBytes()
         The rate limit domain to use when calling the rate limit service.
         
        string domain = 1 [(.validate.rules) = { ... }
        Specified by:
        getDomainBytes in interface RateLimitOrBuilder
        Returns:
        The bytes for domain.
      • setDomain

        public RateLimit.Builder setDomain​(String value)
         The rate limit domain to use when calling the rate limit service.
         
        string domain = 1 [(.validate.rules) = { ... }
        Parameters:
        value - The domain to set.
        Returns:
        This builder for chaining.
      • clearDomain

        public RateLimit.Builder clearDomain()
         The rate limit domain to use when calling the rate limit service.
         
        string domain = 1 [(.validate.rules) = { ... }
        Returns:
        This builder for chaining.
      • setDomainBytes

        public RateLimit.Builder setDomainBytes​(com.google.protobuf.ByteString value)
         The rate limit domain to use when calling the rate limit service.
         
        string domain = 1 [(.validate.rules) = { ... }
        Parameters:
        value - The bytes for domain to set.
        Returns:
        This builder for chaining.
      • getStage

        public int getStage()
         Specifies the rate limit configurations to be applied with the same
         stage number. If not set, the default stage number is 0.
         .. note::
          The filter supports a range of 0 - 10 inclusively for stage numbers.
         
        uint32 stage = 2 [(.validate.rules) = { ... }
        Specified by:
        getStage in interface RateLimitOrBuilder
        Returns:
        The stage.
      • setStage

        public RateLimit.Builder setStage​(int value)
         Specifies the rate limit configurations to be applied with the same
         stage number. If not set, the default stage number is 0.
         .. note::
          The filter supports a range of 0 - 10 inclusively for stage numbers.
         
        uint32 stage = 2 [(.validate.rules) = { ... }
        Parameters:
        value - The stage to set.
        Returns:
        This builder for chaining.
      • clearStage

        public RateLimit.Builder clearStage()
         Specifies the rate limit configurations to be applied with the same
         stage number. If not set, the default stage number is 0.
         .. note::
          The filter supports a range of 0 - 10 inclusively for stage numbers.
         
        uint32 stage = 2 [(.validate.rules) = { ... }
        Returns:
        This builder for chaining.
      • getRequestType

        public String getRequestType()
         The type of requests the filter should apply to. The supported
         types are *internal*, *external* or *both*. A request is considered internal if
         :ref:`x-envoy-internal<config_http_conn_man_headers_x-envoy-internal>` is set to true. If
         :ref:`x-envoy-internal<config_http_conn_man_headers_x-envoy-internal>` is not set or false, a
         request is considered external. The filter defaults to *both*, and it will apply to all request
         types.
         
        string request_type = 3 [(.validate.rules) = { ... }
        Specified by:
        getRequestType in interface RateLimitOrBuilder
        Returns:
        The requestType.
      • getRequestTypeBytes

        public com.google.protobuf.ByteString getRequestTypeBytes()
         The type of requests the filter should apply to. The supported
         types are *internal*, *external* or *both*. A request is considered internal if
         :ref:`x-envoy-internal<config_http_conn_man_headers_x-envoy-internal>` is set to true. If
         :ref:`x-envoy-internal<config_http_conn_man_headers_x-envoy-internal>` is not set or false, a
         request is considered external. The filter defaults to *both*, and it will apply to all request
         types.
         
        string request_type = 3 [(.validate.rules) = { ... }
        Specified by:
        getRequestTypeBytes in interface RateLimitOrBuilder
        Returns:
        The bytes for requestType.
      • setRequestType

        public RateLimit.Builder setRequestType​(String value)
         The type of requests the filter should apply to. The supported
         types are *internal*, *external* or *both*. A request is considered internal if
         :ref:`x-envoy-internal<config_http_conn_man_headers_x-envoy-internal>` is set to true. If
         :ref:`x-envoy-internal<config_http_conn_man_headers_x-envoy-internal>` is not set or false, a
         request is considered external. The filter defaults to *both*, and it will apply to all request
         types.
         
        string request_type = 3 [(.validate.rules) = { ... }
        Parameters:
        value - The requestType to set.
        Returns:
        This builder for chaining.
      • clearRequestType

        public RateLimit.Builder clearRequestType()
         The type of requests the filter should apply to. The supported
         types are *internal*, *external* or *both*. A request is considered internal if
         :ref:`x-envoy-internal<config_http_conn_man_headers_x-envoy-internal>` is set to true. If
         :ref:`x-envoy-internal<config_http_conn_man_headers_x-envoy-internal>` is not set or false, a
         request is considered external. The filter defaults to *both*, and it will apply to all request
         types.
         
        string request_type = 3 [(.validate.rules) = { ... }
        Returns:
        This builder for chaining.
      • setRequestTypeBytes

        public RateLimit.Builder setRequestTypeBytes​(com.google.protobuf.ByteString value)
         The type of requests the filter should apply to. The supported
         types are *internal*, *external* or *both*. A request is considered internal if
         :ref:`x-envoy-internal<config_http_conn_man_headers_x-envoy-internal>` is set to true. If
         :ref:`x-envoy-internal<config_http_conn_man_headers_x-envoy-internal>` is not set or false, a
         request is considered external. The filter defaults to *both*, and it will apply to all request
         types.
         
        string request_type = 3 [(.validate.rules) = { ... }
        Parameters:
        value - The bytes for requestType to set.
        Returns:
        This builder for chaining.
      • hasTimeout

        public boolean hasTimeout()
         The timeout in milliseconds for the rate limit service RPC. If not
         set, this defaults to 20ms.
         
        .google.protobuf.Duration timeout = 4;
        Specified by:
        hasTimeout in interface RateLimitOrBuilder
        Returns:
        Whether the timeout field is set.
      • getTimeout

        public com.google.protobuf.Duration getTimeout()
         The timeout in milliseconds for the rate limit service RPC. If not
         set, this defaults to 20ms.
         
        .google.protobuf.Duration timeout = 4;
        Specified by:
        getTimeout in interface RateLimitOrBuilder
        Returns:
        The timeout.
      • setTimeout

        public RateLimit.Builder setTimeout​(com.google.protobuf.Duration value)
         The timeout in milliseconds for the rate limit service RPC. If not
         set, this defaults to 20ms.
         
        .google.protobuf.Duration timeout = 4;
      • setTimeout

        public RateLimit.Builder setTimeout​(com.google.protobuf.Duration.Builder builderForValue)
         The timeout in milliseconds for the rate limit service RPC. If not
         set, this defaults to 20ms.
         
        .google.protobuf.Duration timeout = 4;
      • mergeTimeout

        public RateLimit.Builder mergeTimeout​(com.google.protobuf.Duration value)
         The timeout in milliseconds for the rate limit service RPC. If not
         set, this defaults to 20ms.
         
        .google.protobuf.Duration timeout = 4;
      • clearTimeout

        public RateLimit.Builder clearTimeout()
         The timeout in milliseconds for the rate limit service RPC. If not
         set, this defaults to 20ms.
         
        .google.protobuf.Duration timeout = 4;
      • getTimeoutBuilder

        public com.google.protobuf.Duration.Builder getTimeoutBuilder()
         The timeout in milliseconds for the rate limit service RPC. If not
         set, this defaults to 20ms.
         
        .google.protobuf.Duration timeout = 4;
      • getTimeoutOrBuilder

        public com.google.protobuf.DurationOrBuilder getTimeoutOrBuilder()
         The timeout in milliseconds for the rate limit service RPC. If not
         set, this defaults to 20ms.
         
        .google.protobuf.Duration timeout = 4;
        Specified by:
        getTimeoutOrBuilder in interface RateLimitOrBuilder
      • getFailureModeDeny

        public boolean getFailureModeDeny()
         The filter's behaviour in case the rate limiting service does
         not respond back. When it is set to true, Envoy will not allow traffic in case of
         communication failure between rate limiting service and the proxy.
         Defaults to false.
         
        bool failure_mode_deny = 5;
        Specified by:
        getFailureModeDeny in interface RateLimitOrBuilder
        Returns:
        The failureModeDeny.
      • setFailureModeDeny

        public RateLimit.Builder setFailureModeDeny​(boolean value)
         The filter's behaviour in case the rate limiting service does
         not respond back. When it is set to true, Envoy will not allow traffic in case of
         communication failure between rate limiting service and the proxy.
         Defaults to false.
         
        bool failure_mode_deny = 5;
        Parameters:
        value - The failureModeDeny to set.
        Returns:
        This builder for chaining.
      • clearFailureModeDeny

        public RateLimit.Builder clearFailureModeDeny()
         The filter's behaviour in case the rate limiting service does
         not respond back. When it is set to true, Envoy will not allow traffic in case of
         communication failure between rate limiting service and the proxy.
         Defaults to false.
         
        bool failure_mode_deny = 5;
        Returns:
        This builder for chaining.
      • getRateLimitedAsResourceExhausted

        public boolean getRateLimitedAsResourceExhausted()
         Specifies whether a `RESOURCE_EXHAUSTED` gRPC code must be returned instead
         of the default `UNAVAILABLE` gRPC code for a rate limited gRPC call. The
         HTTP code will be 200 for a gRPC response.
         
        bool rate_limited_as_resource_exhausted = 6;
        Specified by:
        getRateLimitedAsResourceExhausted in interface RateLimitOrBuilder
        Returns:
        The rateLimitedAsResourceExhausted.
      • setRateLimitedAsResourceExhausted

        public RateLimit.Builder setRateLimitedAsResourceExhausted​(boolean value)
         Specifies whether a `RESOURCE_EXHAUSTED` gRPC code must be returned instead
         of the default `UNAVAILABLE` gRPC code for a rate limited gRPC call. The
         HTTP code will be 200 for a gRPC response.
         
        bool rate_limited_as_resource_exhausted = 6;
        Parameters:
        value - The rateLimitedAsResourceExhausted to set.
        Returns:
        This builder for chaining.
      • clearRateLimitedAsResourceExhausted

        public RateLimit.Builder clearRateLimitedAsResourceExhausted()
         Specifies whether a `RESOURCE_EXHAUSTED` gRPC code must be returned instead
         of the default `UNAVAILABLE` gRPC code for a rate limited gRPC call. The
         HTTP code will be 200 for a gRPC response.
         
        bool rate_limited_as_resource_exhausted = 6;
        Returns:
        This builder for chaining.
      • hasRateLimitService

        public boolean hasRateLimitService()
         Configuration for an external rate limit service provider. If not
         specified, any calls to the rate limit service will immediately return
         success.
         
        .envoy.config.ratelimit.v2.RateLimitServiceConfig rate_limit_service = 7 [(.validate.rules) = { ... }
        Specified by:
        hasRateLimitService in interface RateLimitOrBuilder
        Returns:
        Whether the rateLimitService field is set.
      • getRateLimitService

        public RateLimitServiceConfig getRateLimitService()
         Configuration for an external rate limit service provider. If not
         specified, any calls to the rate limit service will immediately return
         success.
         
        .envoy.config.ratelimit.v2.RateLimitServiceConfig rate_limit_service = 7 [(.validate.rules) = { ... }
        Specified by:
        getRateLimitService in interface RateLimitOrBuilder
        Returns:
        The rateLimitService.
      • setRateLimitService

        public RateLimit.Builder setRateLimitService​(RateLimitServiceConfig value)
         Configuration for an external rate limit service provider. If not
         specified, any calls to the rate limit service will immediately return
         success.
         
        .envoy.config.ratelimit.v2.RateLimitServiceConfig rate_limit_service = 7 [(.validate.rules) = { ... }
      • setRateLimitService

        public RateLimit.Builder setRateLimitService​(RateLimitServiceConfig.Builder builderForValue)
         Configuration for an external rate limit service provider. If not
         specified, any calls to the rate limit service will immediately return
         success.
         
        .envoy.config.ratelimit.v2.RateLimitServiceConfig rate_limit_service = 7 [(.validate.rules) = { ... }
      • mergeRateLimitService

        public RateLimit.Builder mergeRateLimitService​(RateLimitServiceConfig value)
         Configuration for an external rate limit service provider. If not
         specified, any calls to the rate limit service will immediately return
         success.
         
        .envoy.config.ratelimit.v2.RateLimitServiceConfig rate_limit_service = 7 [(.validate.rules) = { ... }
      • clearRateLimitService

        public RateLimit.Builder clearRateLimitService()
         Configuration for an external rate limit service provider. If not
         specified, any calls to the rate limit service will immediately return
         success.
         
        .envoy.config.ratelimit.v2.RateLimitServiceConfig rate_limit_service = 7 [(.validate.rules) = { ... }
      • getRateLimitServiceBuilder

        public RateLimitServiceConfig.Builder getRateLimitServiceBuilder()
         Configuration for an external rate limit service provider. If not
         specified, any calls to the rate limit service will immediately return
         success.
         
        .envoy.config.ratelimit.v2.RateLimitServiceConfig rate_limit_service = 7 [(.validate.rules) = { ... }
      • getRateLimitServiceOrBuilder

        public RateLimitServiceConfigOrBuilder getRateLimitServiceOrBuilder()
         Configuration for an external rate limit service provider. If not
         specified, any calls to the rate limit service will immediately return
         success.
         
        .envoy.config.ratelimit.v2.RateLimitServiceConfig rate_limit_service = 7 [(.validate.rules) = { ... }
        Specified by:
        getRateLimitServiceOrBuilder in interface RateLimitOrBuilder
      • setUnknownFields

        public final RateLimit.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<RateLimit.Builder>
      • mergeUnknownFields

        public final RateLimit.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<RateLimit.Builder>