Class RateLimitStrategy

  • All Implemented Interfaces:
    com.google.protobuf.Message, com.google.protobuf.MessageLite, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, RateLimitStrategyOrBuilder, java.io.Serializable

    public final class RateLimitStrategy
    extends com.google.protobuf.GeneratedMessage
    implements RateLimitStrategyOrBuilder
    Protobuf type envoy.type.v3.RateLimitStrategy
    See Also:
    Serialized Form
    • Field Detail

      • strategyCase_

        private int strategyCase_
      • strategy_

        private java.lang.Object strategy_
      • BLANKET_RULE_FIELD_NUMBER

        public static final int BLANKET_RULE_FIELD_NUMBER
        See Also:
        Constant Field Values
      • REQUESTS_PER_TIME_UNIT_FIELD_NUMBER

        public static final int REQUESTS_PER_TIME_UNIT_FIELD_NUMBER
        See Also:
        Constant Field Values
      • TOKEN_BUCKET_FIELD_NUMBER

        public static final int TOKEN_BUCKET_FIELD_NUMBER
        See Also:
        Constant Field Values
      • memoizedIsInitialized

        private byte memoizedIsInitialized
    • Constructor Detail

      • RateLimitStrategy

        private RateLimitStrategy​(com.google.protobuf.GeneratedMessage.Builder<?> builder)
      • RateLimitStrategy

        private RateLimitStrategy()
    • 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
      • hasBlanketRule

        public boolean hasBlanketRule()
         Allow or Deny the requests.
         If unset, allow all.
         
        .envoy.type.v3.RateLimitStrategy.BlanketRule blanket_rule = 1 [(.validate.rules) = { ... }
        Specified by:
        hasBlanketRule in interface RateLimitStrategyOrBuilder
        Returns:
        Whether the blanketRule field is set.
      • getBlanketRuleValue

        public int getBlanketRuleValue()
         Allow or Deny the requests.
         If unset, allow all.
         
        .envoy.type.v3.RateLimitStrategy.BlanketRule blanket_rule = 1 [(.validate.rules) = { ... }
        Specified by:
        getBlanketRuleValue in interface RateLimitStrategyOrBuilder
        Returns:
        The enum numeric value on the wire for blanketRule.
      • hasRequestsPerTimeUnit

        public boolean hasRequestsPerTimeUnit()
         Best-effort limit of the number of requests per time unit, f.e. requests per second.
         Does not prescribe any specific rate limiting algorithm, see :ref:`RequestsPerTimeUnit
         <envoy_v3_api_msg_type.v3.RateLimitStrategy.RequestsPerTimeUnit>` for details.
         
        .envoy.type.v3.RateLimitStrategy.RequestsPerTimeUnit requests_per_time_unit = 2;
        Specified by:
        hasRequestsPerTimeUnit in interface RateLimitStrategyOrBuilder
        Returns:
        Whether the requestsPerTimeUnit field is set.
      • getRequestsPerTimeUnit

        public RateLimitStrategy.RequestsPerTimeUnit getRequestsPerTimeUnit()
         Best-effort limit of the number of requests per time unit, f.e. requests per second.
         Does not prescribe any specific rate limiting algorithm, see :ref:`RequestsPerTimeUnit
         <envoy_v3_api_msg_type.v3.RateLimitStrategy.RequestsPerTimeUnit>` for details.
         
        .envoy.type.v3.RateLimitStrategy.RequestsPerTimeUnit requests_per_time_unit = 2;
        Specified by:
        getRequestsPerTimeUnit in interface RateLimitStrategyOrBuilder
        Returns:
        The requestsPerTimeUnit.
      • getRequestsPerTimeUnitOrBuilder

        public RateLimitStrategy.RequestsPerTimeUnitOrBuilder getRequestsPerTimeUnitOrBuilder()
         Best-effort limit of the number of requests per time unit, f.e. requests per second.
         Does not prescribe any specific rate limiting algorithm, see :ref:`RequestsPerTimeUnit
         <envoy_v3_api_msg_type.v3.RateLimitStrategy.RequestsPerTimeUnit>` for details.
         
        .envoy.type.v3.RateLimitStrategy.RequestsPerTimeUnit requests_per_time_unit = 2;
        Specified by:
        getRequestsPerTimeUnitOrBuilder in interface RateLimitStrategyOrBuilder
      • hasTokenBucket

        public boolean hasTokenBucket()
         Limit the requests by consuming tokens from the Token Bucket.
         Allow the same number of requests as the number of tokens available in
         the token bucket.
         
        .envoy.type.v3.TokenBucket token_bucket = 3;
        Specified by:
        hasTokenBucket in interface RateLimitStrategyOrBuilder
        Returns:
        Whether the tokenBucket field is set.
      • getTokenBucket

        public TokenBucket getTokenBucket()
         Limit the requests by consuming tokens from the Token Bucket.
         Allow the same number of requests as the number of tokens available in
         the token bucket.
         
        .envoy.type.v3.TokenBucket token_bucket = 3;
        Specified by:
        getTokenBucket in interface RateLimitStrategyOrBuilder
        Returns:
        The tokenBucket.
      • getTokenBucketOrBuilder

        public TokenBucketOrBuilder getTokenBucketOrBuilder()
         Limit the requests by consuming tokens from the Token Bucket.
         Allow the same number of requests as the number of tokens available in
         the token bucket.
         
        .envoy.type.v3.TokenBucket token_bucket = 3;
        Specified by:
        getTokenBucketOrBuilder in interface RateLimitStrategyOrBuilder
      • isInitialized

        public final boolean isInitialized()
        Specified by:
        isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
        Overrides:
        isInitialized in class com.google.protobuf.GeneratedMessage
      • writeTo

        public void writeTo​(com.google.protobuf.CodedOutputStream output)
                     throws java.io.IOException
        Specified by:
        writeTo in interface com.google.protobuf.MessageLite
        Overrides:
        writeTo in class com.google.protobuf.GeneratedMessage
        Throws:
        java.io.IOException
      • getSerializedSize

        public int getSerializedSize()
        Specified by:
        getSerializedSize in interface com.google.protobuf.MessageLite
        Overrides:
        getSerializedSize in class com.google.protobuf.GeneratedMessage
      • equals

        public boolean equals​(java.lang.Object obj)
        Specified by:
        equals in interface com.google.protobuf.Message
        Overrides:
        equals in class com.google.protobuf.AbstractMessage
      • hashCode

        public int hashCode()
        Specified by:
        hashCode in interface com.google.protobuf.Message
        Overrides:
        hashCode in class com.google.protobuf.AbstractMessage
      • parseFrom

        public static RateLimitStrategy parseFrom​(java.nio.ByteBuffer data)
                                           throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static RateLimitStrategy parseFrom​(java.nio.ByteBuffer data,
                                                  com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                                           throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static RateLimitStrategy parseFrom​(com.google.protobuf.ByteString data)
                                           throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static RateLimitStrategy parseFrom​(com.google.protobuf.ByteString data,
                                                  com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                                           throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static RateLimitStrategy parseFrom​(byte[] data)
                                           throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static RateLimitStrategy parseFrom​(byte[] data,
                                                  com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                                           throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static RateLimitStrategy parseFrom​(java.io.InputStream input)
                                           throws java.io.IOException
        Throws:
        java.io.IOException
      • parseFrom

        public static RateLimitStrategy parseFrom​(java.io.InputStream input,
                                                  com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                                           throws java.io.IOException
        Throws:
        java.io.IOException
      • parseDelimitedFrom

        public static RateLimitStrategy parseDelimitedFrom​(java.io.InputStream input)
                                                    throws java.io.IOException
        Throws:
        java.io.IOException
      • parseDelimitedFrom

        public static RateLimitStrategy parseDelimitedFrom​(java.io.InputStream input,
                                                           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                                                    throws java.io.IOException
        Throws:
        java.io.IOException
      • parseFrom

        public static RateLimitStrategy parseFrom​(com.google.protobuf.CodedInputStream input)
                                           throws java.io.IOException
        Throws:
        java.io.IOException
      • parseFrom

        public static RateLimitStrategy parseFrom​(com.google.protobuf.CodedInputStream input,
                                                  com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                                           throws java.io.IOException
        Throws:
        java.io.IOException
      • newBuilderForType

        public RateLimitStrategy.Builder newBuilderForType()
        Specified by:
        newBuilderForType in interface com.google.protobuf.Message
        Specified by:
        newBuilderForType in interface com.google.protobuf.MessageLite
      • toBuilder

        public RateLimitStrategy.Builder toBuilder()
        Specified by:
        toBuilder in interface com.google.protobuf.Message
        Specified by:
        toBuilder in interface com.google.protobuf.MessageLite
      • newBuilderForType

        protected RateLimitStrategy.Builder newBuilderForType​(com.google.protobuf.AbstractMessage.BuilderParent parent)
        Overrides:
        newBuilderForType in class com.google.protobuf.AbstractMessage
      • getParserForType

        public com.google.protobuf.Parser<RateLimitStrategy> getParserForType()
        Specified by:
        getParserForType in interface com.google.protobuf.Message
        Specified by:
        getParserForType in interface com.google.protobuf.MessageLite
        Overrides:
        getParserForType in class com.google.protobuf.GeneratedMessage
      • getDefaultInstanceForType

        public RateLimitStrategy getDefaultInstanceForType()
        Specified by:
        getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
        Specified by:
        getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder