Class RateLimitQuotaBucketSettings.DenyResponseSettings

java.lang.Object
com.google.protobuf.AbstractMessageLite
com.google.protobuf.AbstractMessage
com.google.protobuf.GeneratedMessage
io.envoyproxy.envoy.extensions.filters.http.rate_limit_quota.v3.RateLimitQuotaBucketSettings.DenyResponseSettings
All Implemented Interfaces:
com.google.protobuf.Message, com.google.protobuf.MessageLite, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, RateLimitQuotaBucketSettings.DenyResponseSettingsOrBuilder, Serializable
Enclosing class:
RateLimitQuotaBucketSettings

public static final class RateLimitQuotaBucketSettings.DenyResponseSettings extends com.google.protobuf.GeneratedMessage implements RateLimitQuotaBucketSettings.DenyResponseSettingsOrBuilder
 Customize the deny response to the requests over the rate limit.
 
Protobuf type envoy.extensions.filters.http.rate_limit_quota.v3.RateLimitQuotaBucketSettings.DenyResponseSettings
See Also:
  • Field Details

  • Constructor Details

    • DenyResponseSettings

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

      private DenyResponseSettings()
  • Method Details

    • 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
    • hasHttpStatus

      public boolean hasHttpStatus()
       HTTP response code to deny for HTTP requests (gRPC excluded).
       Defaults to 429 (:ref:`StatusCode.TooManyRequests<envoy_v3_api_enum_value_type.v3.StatusCode.TooManyRequests>`).
       
      .envoy.type.v3.HttpStatus http_status = 1;
      Specified by:
      hasHttpStatus in interface RateLimitQuotaBucketSettings.DenyResponseSettingsOrBuilder
      Returns:
      Whether the httpStatus field is set.
    • getHttpStatus

      public HttpStatus getHttpStatus()
       HTTP response code to deny for HTTP requests (gRPC excluded).
       Defaults to 429 (:ref:`StatusCode.TooManyRequests<envoy_v3_api_enum_value_type.v3.StatusCode.TooManyRequests>`).
       
      .envoy.type.v3.HttpStatus http_status = 1;
      Specified by:
      getHttpStatus in interface RateLimitQuotaBucketSettings.DenyResponseSettingsOrBuilder
      Returns:
      The httpStatus.
    • getHttpStatusOrBuilder

      public HttpStatusOrBuilder getHttpStatusOrBuilder()
       HTTP response code to deny for HTTP requests (gRPC excluded).
       Defaults to 429 (:ref:`StatusCode.TooManyRequests<envoy_v3_api_enum_value_type.v3.StatusCode.TooManyRequests>`).
       
      .envoy.type.v3.HttpStatus http_status = 1;
      Specified by:
      getHttpStatusOrBuilder in interface RateLimitQuotaBucketSettings.DenyResponseSettingsOrBuilder
    • hasHttpBody

      public boolean hasHttpBody()
       HTTP response body used to deny for HTTP requests (gRPC excluded).
       If not set, an empty body is returned.
       
      .google.protobuf.BytesValue http_body = 2;
      Specified by:
      hasHttpBody in interface RateLimitQuotaBucketSettings.DenyResponseSettingsOrBuilder
      Returns:
      Whether the httpBody field is set.
    • getHttpBody

      public com.google.protobuf.BytesValue getHttpBody()
       HTTP response body used to deny for HTTP requests (gRPC excluded).
       If not set, an empty body is returned.
       
      .google.protobuf.BytesValue http_body = 2;
      Specified by:
      getHttpBody in interface RateLimitQuotaBucketSettings.DenyResponseSettingsOrBuilder
      Returns:
      The httpBody.
    • getHttpBodyOrBuilder

      public com.google.protobuf.BytesValueOrBuilder getHttpBodyOrBuilder()
       HTTP response body used to deny for HTTP requests (gRPC excluded).
       If not set, an empty body is returned.
       
      .google.protobuf.BytesValue http_body = 2;
      Specified by:
      getHttpBodyOrBuilder in interface RateLimitQuotaBucketSettings.DenyResponseSettingsOrBuilder
    • hasGrpcStatus

      public boolean hasGrpcStatus()
       Configure the deny response for gRPC requests over the rate limit.
       Allows to specify the `RPC status code
       <https://cloud.google.com/natural-language/docs/reference/rpc/google.rpc#google.rpc.Code>`_,
       and the error message.
       Defaults to the Status with the RPC Code ``UNAVAILABLE`` and empty message.
      
       To identify gRPC requests, Envoy checks that the ``Content-Type`` header is
       ``application/grpc``, or one of the various ``application/grpc+`` values.
      
       .. note::
       The HTTP code for a gRPC response is always 200.
       
      .google.rpc.Status grpc_status = 3;
      Specified by:
      hasGrpcStatus in interface RateLimitQuotaBucketSettings.DenyResponseSettingsOrBuilder
      Returns:
      Whether the grpcStatus field is set.
    • getGrpcStatus

      public com.google.rpc.Status getGrpcStatus()
       Configure the deny response for gRPC requests over the rate limit.
       Allows to specify the `RPC status code
       <https://cloud.google.com/natural-language/docs/reference/rpc/google.rpc#google.rpc.Code>`_,
       and the error message.
       Defaults to the Status with the RPC Code ``UNAVAILABLE`` and empty message.
      
       To identify gRPC requests, Envoy checks that the ``Content-Type`` header is
       ``application/grpc``, or one of the various ``application/grpc+`` values.
      
       .. note::
       The HTTP code for a gRPC response is always 200.
       
      .google.rpc.Status grpc_status = 3;
      Specified by:
      getGrpcStatus in interface RateLimitQuotaBucketSettings.DenyResponseSettingsOrBuilder
      Returns:
      The grpcStatus.
    • getGrpcStatusOrBuilder

      public com.google.rpc.StatusOrBuilder getGrpcStatusOrBuilder()
       Configure the deny response for gRPC requests over the rate limit.
       Allows to specify the `RPC status code
       <https://cloud.google.com/natural-language/docs/reference/rpc/google.rpc#google.rpc.Code>`_,
       and the error message.
       Defaults to the Status with the RPC Code ``UNAVAILABLE`` and empty message.
      
       To identify gRPC requests, Envoy checks that the ``Content-Type`` header is
       ``application/grpc``, or one of the various ``application/grpc+`` values.
      
       .. note::
       The HTTP code for a gRPC response is always 200.
       
      .google.rpc.Status grpc_status = 3;
      Specified by:
      getGrpcStatusOrBuilder in interface RateLimitQuotaBucketSettings.DenyResponseSettingsOrBuilder
    • getResponseHeadersToAddList

      public List<HeaderValueOption> getResponseHeadersToAddList()
       Specifies a list of HTTP headers that should be added to each response for requests that
       have been rate limited. Applies both to plain HTTP, and gRPC requests.
       The headers are added even when the rate limit quota was not enforced.
       
      repeated .envoy.config.core.v3.HeaderValueOption response_headers_to_add = 4 [(.validate.rules) = { ... }
      Specified by:
      getResponseHeadersToAddList in interface RateLimitQuotaBucketSettings.DenyResponseSettingsOrBuilder
    • getResponseHeadersToAddOrBuilderList

      public List<? extends HeaderValueOptionOrBuilder> getResponseHeadersToAddOrBuilderList()
       Specifies a list of HTTP headers that should be added to each response for requests that
       have been rate limited. Applies both to plain HTTP, and gRPC requests.
       The headers are added even when the rate limit quota was not enforced.
       
      repeated .envoy.config.core.v3.HeaderValueOption response_headers_to_add = 4 [(.validate.rules) = { ... }
      Specified by:
      getResponseHeadersToAddOrBuilderList in interface RateLimitQuotaBucketSettings.DenyResponseSettingsOrBuilder
    • getResponseHeadersToAddCount

      public int getResponseHeadersToAddCount()
       Specifies a list of HTTP headers that should be added to each response for requests that
       have been rate limited. Applies both to plain HTTP, and gRPC requests.
       The headers are added even when the rate limit quota was not enforced.
       
      repeated .envoy.config.core.v3.HeaderValueOption response_headers_to_add = 4 [(.validate.rules) = { ... }
      Specified by:
      getResponseHeadersToAddCount in interface RateLimitQuotaBucketSettings.DenyResponseSettingsOrBuilder
    • getResponseHeadersToAdd

      public HeaderValueOption getResponseHeadersToAdd(int index)
       Specifies a list of HTTP headers that should be added to each response for requests that
       have been rate limited. Applies both to plain HTTP, and gRPC requests.
       The headers are added even when the rate limit quota was not enforced.
       
      repeated .envoy.config.core.v3.HeaderValueOption response_headers_to_add = 4 [(.validate.rules) = { ... }
      Specified by:
      getResponseHeadersToAdd in interface RateLimitQuotaBucketSettings.DenyResponseSettingsOrBuilder
    • getResponseHeadersToAddOrBuilder

      public HeaderValueOptionOrBuilder getResponseHeadersToAddOrBuilder(int index)
       Specifies a list of HTTP headers that should be added to each response for requests that
       have been rate limited. Applies both to plain HTTP, and gRPC requests.
       The headers are added even when the rate limit quota was not enforced.
       
      repeated .envoy.config.core.v3.HeaderValueOption response_headers_to_add = 4 [(.validate.rules) = { ... }
      Specified by:
      getResponseHeadersToAddOrBuilder in interface RateLimitQuotaBucketSettings.DenyResponseSettingsOrBuilder
    • 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 IOException
      Specified by:
      writeTo in interface com.google.protobuf.MessageLite
      Overrides:
      writeTo in class com.google.protobuf.GeneratedMessage
      Throws:
      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(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 RateLimitQuotaBucketSettings.DenyResponseSettings parseFrom(ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

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

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

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

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

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

      Throws:
      IOException
    • parseFrom

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

      public static RateLimitQuotaBucketSettings.DenyResponseSettings parseDelimitedFrom(InputStream input) throws IOException
      Throws:
      IOException
    • parseDelimitedFrom

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

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

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

      Specified by:
      newBuilderForType in interface com.google.protobuf.Message
      Specified by:
      newBuilderForType in interface com.google.protobuf.MessageLite
    • newBuilder

    • newBuilder

    • toBuilder

      Specified by:
      toBuilder in interface com.google.protobuf.Message
      Specified by:
      toBuilder in interface com.google.protobuf.MessageLite
    • newBuilderForType

      protected RateLimitQuotaBucketSettings.DenyResponseSettings.Builder newBuilderForType(com.google.protobuf.AbstractMessage.BuilderParent parent)
      Overrides:
      newBuilderForType in class com.google.protobuf.AbstractMessage
    • getDefaultInstance

      public static RateLimitQuotaBucketSettings.DenyResponseSettings getDefaultInstance()
    • parser

      public static com.google.protobuf.Parser<RateLimitQuotaBucketSettings.DenyResponseSettings> parser()
    • getParserForType

      public com.google.protobuf.Parser<RateLimitQuotaBucketSettings.DenyResponseSettings> 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 RateLimitQuotaBucketSettings.DenyResponseSettings getDefaultInstanceForType()
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder