Class RateLimitResponse.Quota

java.lang.Object
com.google.protobuf.AbstractMessageLite
com.google.protobuf.AbstractMessage
com.google.protobuf.GeneratedMessageV3
io.envoyproxy.envoy.service.ratelimit.v3.RateLimitResponse.Quota
All Implemented Interfaces:
com.google.protobuf.Message, com.google.protobuf.MessageLite, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, RateLimitResponse.QuotaOrBuilder, Serializable
Enclosing class:
RateLimitResponse

public static final class RateLimitResponse.Quota extends com.google.protobuf.GeneratedMessageV3 implements RateLimitResponse.QuotaOrBuilder
 Cacheable quota for responses.
 Quota can be granted at different levels: either for each individual descriptor or for the whole descriptor set.
 This is a certain number of requests over a period of time.
 The client may cache this result and apply the effective RateLimitResponse to future matching
 requests without querying rate limit service.

 When quota expires due to timeout, a new RLS request will also be made.
 The implementation may choose to preemptively query the rate limit server for more quota on or
 before expiration or before the available quota runs out.
 [#not-implemented-hide:]
 
Protobuf type envoy.service.ratelimit.v3.RateLimitResponse.Quota
See Also:
  • Field Details

  • Method Details

    • newInstance

      protected Object newInstance(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused)
      Overrides:
      newInstance in class com.google.protobuf.GeneratedMessageV3
    • 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
    • getExpirationSpecifierCase

      public RateLimitResponse.Quota.ExpirationSpecifierCase getExpirationSpecifierCase()
      Specified by:
      getExpirationSpecifierCase in interface RateLimitResponse.QuotaOrBuilder
    • getRequests

      public int getRequests()
       Number of matching requests granted in quota. Must be 1 or more.
       
      uint32 requests = 1 [(.validate.rules) = { ... }
      Specified by:
      getRequests in interface RateLimitResponse.QuotaOrBuilder
      Returns:
      The requests.
    • hasValidUntil

      public boolean hasValidUntil()
       Point in time at which the quota expires.
       
      .google.protobuf.Timestamp valid_until = 2;
      Specified by:
      hasValidUntil in interface RateLimitResponse.QuotaOrBuilder
      Returns:
      Whether the validUntil field is set.
    • getValidUntil

      public com.google.protobuf.Timestamp getValidUntil()
       Point in time at which the quota expires.
       
      .google.protobuf.Timestamp valid_until = 2;
      Specified by:
      getValidUntil in interface RateLimitResponse.QuotaOrBuilder
      Returns:
      The validUntil.
    • getValidUntilOrBuilder

      public com.google.protobuf.TimestampOrBuilder getValidUntilOrBuilder()
       Point in time at which the quota expires.
       
      .google.protobuf.Timestamp valid_until = 2;
      Specified by:
      getValidUntilOrBuilder in interface RateLimitResponse.QuotaOrBuilder
    • getId

      public String getId()
       The unique id that is associated with each Quota either at individual descriptor level or whole descriptor set level.
      
       For a matching policy with boolean logic, for example, match: "request.headers['environment'] == 'staging' || request.headers['environment'] == 'dev'"),
       the request_headers action produces a distinct list of descriptors for each possible value of the ‘environment’ header even though the granted quota is same.
       Thus, the client will use this id information (returned from RLS server) to correctly correlate the multiple descriptors/descriptor sets that have been granted with same quota (i.e., share the same quota among multiple descriptors or descriptor sets.)
      
       If id is empty, this id field will be ignored. If quota for the same id changes (e.g. due to configuration update), the old quota will be overridden by the new one. Shared quotas referenced by ID will still adhere to expiration after `valid_until`.
       
      string id = 3;
      Specified by:
      getId in interface RateLimitResponse.QuotaOrBuilder
      Returns:
      The id.
    • getIdBytes

      public com.google.protobuf.ByteString getIdBytes()
       The unique id that is associated with each Quota either at individual descriptor level or whole descriptor set level.
      
       For a matching policy with boolean logic, for example, match: "request.headers['environment'] == 'staging' || request.headers['environment'] == 'dev'"),
       the request_headers action produces a distinct list of descriptors for each possible value of the ‘environment’ header even though the granted quota is same.
       Thus, the client will use this id information (returned from RLS server) to correctly correlate the multiple descriptors/descriptor sets that have been granted with same quota (i.e., share the same quota among multiple descriptors or descriptor sets.)
      
       If id is empty, this id field will be ignored. If quota for the same id changes (e.g. due to configuration update), the old quota will be overridden by the new one. Shared quotas referenced by ID will still adhere to expiration after `valid_until`.
       
      string id = 3;
      Specified by:
      getIdBytes in interface RateLimitResponse.QuotaOrBuilder
      Returns:
      The bytes for id.
    • isInitialized

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

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

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

      public boolean equals(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 RateLimitResponse.Quota parseFrom(ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static RateLimitResponse.Quota parseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

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

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

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

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

      public static RateLimitResponse.Quota parseFrom(InputStream input) throws IOException
      Throws:
      IOException
    • parseFrom

      public static RateLimitResponse.Quota parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Throws:
      IOException
    • parseDelimitedFrom

      public static RateLimitResponse.Quota parseDelimitedFrom(InputStream input) throws IOException
      Throws:
      IOException
    • parseDelimitedFrom

      public static RateLimitResponse.Quota parseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Throws:
      IOException
    • parseFrom

      public static RateLimitResponse.Quota parseFrom(com.google.protobuf.CodedInputStream input) throws IOException
      Throws:
      IOException
    • parseFrom

      public static RateLimitResponse.Quota parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Throws:
      IOException
    • newBuilderForType

      public RateLimitResponse.Quota.Builder newBuilderForType()
      Specified by:
      newBuilderForType in interface com.google.protobuf.Message
      Specified by:
      newBuilderForType in interface com.google.protobuf.MessageLite
    • newBuilder

      public static RateLimitResponse.Quota.Builder newBuilder()
    • newBuilder

      public static RateLimitResponse.Quota.Builder newBuilder(RateLimitResponse.Quota prototype)
    • toBuilder

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

      protected RateLimitResponse.Quota.Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)
      Specified by:
      newBuilderForType in class com.google.protobuf.GeneratedMessageV3
    • getDefaultInstance

      public static RateLimitResponse.Quota getDefaultInstance()
    • parser

      public static com.google.protobuf.Parser<RateLimitResponse.Quota> parser()
    • getParserForType

      public com.google.protobuf.Parser<RateLimitResponse.Quota> 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.GeneratedMessageV3
    • getDefaultInstanceForType

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