All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.envoyproxy.envoy.extensions.common.ratelimit.v3.RateLimitDescriptor Maven / Gradle / Ivy

There is a newer version: 1.0.46
Show newest version
// Generated by the protocol buffer compiler.  DO NOT EDIT!
// source: envoy/extensions/common/ratelimit/v3/ratelimit.proto

package io.envoyproxy.envoy.extensions.common.ratelimit.v3;

/**
 * 
 * A RateLimitDescriptor is a list of hierarchical entries that are used by the service to
 * determine the final rate limit key and overall allowed limit. Here are some examples of how
 * they might be used for the domain "envoy".
 * .. code-block:: cpp
 *   ["authenticated": "false"], ["remote_address": "10.0.0.1"]
 * What it does: Limits all unauthenticated traffic for the IP address 10.0.0.1. The
 * configuration supplies a default limit for the *remote_address* key. If there is a desire to
 * raise the limit for 10.0.0.1 or block it entirely it can be specified directly in the
 * configuration.
 * .. code-block:: cpp
 *   ["authenticated": "false"], ["path": "/foo/bar"]
 * What it does: Limits all unauthenticated traffic globally for a specific path (or prefix if
 * configured that way in the service).
 * .. code-block:: cpp
 *   ["authenticated": "false"], ["path": "/foo/bar"], ["remote_address": "10.0.0.1"]
 * What it does: Limits unauthenticated traffic to a specific path for a specific IP address.
 * Like (1) we can raise/block specific IP addresses if we want with an override configuration.
 * .. code-block:: cpp
 *   ["authenticated": "true"], ["client_id": "foo"]
 * What it does: Limits all traffic for an authenticated client "foo"
 * .. code-block:: cpp
 *   ["authenticated": "true"], ["client_id": "foo"], ["path": "/foo/bar"]
 * What it does: Limits traffic to a specific path for an authenticated client "foo"
 * The idea behind the API is that (1)/(2)/(3) and (4)/(5) can be sent in 1 request if desired.
 * This enables building complex application scenarios with a generic backend.
 * Optionally the descriptor can contain a limit override under a "limit" key, that specifies
 * the number of requests per unit to use instead of the number configured in the
 * rate limiting service.
 * 
* * Protobuf type {@code envoy.extensions.common.ratelimit.v3.RateLimitDescriptor} */ public final class RateLimitDescriptor extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:envoy.extensions.common.ratelimit.v3.RateLimitDescriptor) RateLimitDescriptorOrBuilder { private static final long serialVersionUID = 0L; // Use RateLimitDescriptor.newBuilder() to construct. private RateLimitDescriptor(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } private RateLimitDescriptor() { entries_ = java.util.Collections.emptyList(); } @java.lang.Override @SuppressWarnings({"unused"}) protected java.lang.Object newInstance( UnusedPrivateParameter unused) { return new RateLimitDescriptor(); } @java.lang.Override public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } private RateLimitDescriptor( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { this(); if (extensionRegistry == null) { throw new java.lang.NullPointerException(); } int mutable_bitField0_ = 0; com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder(); try { boolean done = false; while (!done) { int tag = input.readTag(); switch (tag) { case 0: done = true; break; case 10: { if (!((mutable_bitField0_ & 0x00000001) != 0)) { entries_ = new java.util.ArrayList(); mutable_bitField0_ |= 0x00000001; } entries_.add( input.readMessage(io.envoyproxy.envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry.parser(), extensionRegistry)); break; } case 18: { io.envoyproxy.envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.RateLimitOverride.Builder subBuilder = null; if (limit_ != null) { subBuilder = limit_.toBuilder(); } limit_ = input.readMessage(io.envoyproxy.envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.RateLimitOverride.parser(), extensionRegistry); if (subBuilder != null) { subBuilder.mergeFrom(limit_); limit_ = subBuilder.buildPartial(); } break; } default: { if (!parseUnknownField( input, unknownFields, extensionRegistry, tag)) { done = true; } break; } } } } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.setUnfinishedMessage(this); } catch (com.google.protobuf.UninitializedMessageException e) { throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException( e).setUnfinishedMessage(this); } finally { if (((mutable_bitField0_ & 0x00000001) != 0)) { entries_ = java.util.Collections.unmodifiableList(entries_); } this.unknownFields = unknownFields.build(); makeExtensionsImmutable(); } } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return io.envoyproxy.envoy.extensions.common.ratelimit.v3.RatelimitProto.internal_static_envoy_extensions_common_ratelimit_v3_RateLimitDescriptor_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return io.envoyproxy.envoy.extensions.common.ratelimit.v3.RatelimitProto.internal_static_envoy_extensions_common_ratelimit_v3_RateLimitDescriptor_fieldAccessorTable .ensureFieldAccessorsInitialized( io.envoyproxy.envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.class, io.envoyproxy.envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Builder.class); } public interface EntryOrBuilder extends // @@protoc_insertion_point(interface_extends:envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry) com.google.protobuf.MessageOrBuilder { /** *
     * Descriptor key.
     * 
* * string key = 1 [(.validate.rules) = { ... } * @return The key. */ java.lang.String getKey(); /** *
     * Descriptor key.
     * 
* * string key = 1 [(.validate.rules) = { ... } * @return The bytes for key. */ com.google.protobuf.ByteString getKeyBytes(); /** *
     * Descriptor value.
     * 
* * string value = 2 [(.validate.rules) = { ... } * @return The value. */ java.lang.String getValue(); /** *
     * Descriptor value.
     * 
* * string value = 2 [(.validate.rules) = { ... } * @return The bytes for value. */ com.google.protobuf.ByteString getValueBytes(); } /** * Protobuf type {@code envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry} */ public static final class Entry extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry) EntryOrBuilder { private static final long serialVersionUID = 0L; // Use Entry.newBuilder() to construct. private Entry(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } private Entry() { key_ = ""; value_ = ""; } @java.lang.Override @SuppressWarnings({"unused"}) protected java.lang.Object newInstance( UnusedPrivateParameter unused) { return new Entry(); } @java.lang.Override public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } private Entry( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { this(); if (extensionRegistry == null) { throw new java.lang.NullPointerException(); } com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder(); try { boolean done = false; while (!done) { int tag = input.readTag(); switch (tag) { case 0: done = true; break; case 10: { java.lang.String s = input.readStringRequireUtf8(); key_ = s; break; } case 18: { java.lang.String s = input.readStringRequireUtf8(); value_ = s; break; } default: { if (!parseUnknownField( input, unknownFields, extensionRegistry, tag)) { done = true; } break; } } } } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.setUnfinishedMessage(this); } catch (com.google.protobuf.UninitializedMessageException e) { throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException( e).setUnfinishedMessage(this); } finally { this.unknownFields = unknownFields.build(); makeExtensionsImmutable(); } } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return io.envoyproxy.envoy.extensions.common.ratelimit.v3.RatelimitProto.internal_static_envoy_extensions_common_ratelimit_v3_RateLimitDescriptor_Entry_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return io.envoyproxy.envoy.extensions.common.ratelimit.v3.RatelimitProto.internal_static_envoy_extensions_common_ratelimit_v3_RateLimitDescriptor_Entry_fieldAccessorTable .ensureFieldAccessorsInitialized( io.envoyproxy.envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry.class, io.envoyproxy.envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry.Builder.class); } public static final int KEY_FIELD_NUMBER = 1; private volatile java.lang.Object key_; /** *
     * Descriptor key.
     * 
* * string key = 1 [(.validate.rules) = { ... } * @return The key. */ @java.lang.Override public java.lang.String getKey() { java.lang.Object ref = key_; if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); key_ = s; return s; } } /** *
     * Descriptor key.
     * 
* * string key = 1 [(.validate.rules) = { ... } * @return The bytes for key. */ @java.lang.Override public com.google.protobuf.ByteString getKeyBytes() { java.lang.Object ref = key_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); key_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } public static final int VALUE_FIELD_NUMBER = 2; private volatile java.lang.Object value_; /** *
     * Descriptor value.
     * 
* * string value = 2 [(.validate.rules) = { ... } * @return The value. */ @java.lang.Override public java.lang.String getValue() { java.lang.Object ref = value_; if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); value_ = s; return s; } } /** *
     * Descriptor value.
     * 
* * string value = 2 [(.validate.rules) = { ... } * @return The bytes for value. */ @java.lang.Override public com.google.protobuf.ByteString getValueBytes() { java.lang.Object ref = value_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); value_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } private byte memoizedIsInitialized = -1; @java.lang.Override public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized == 1) return true; if (isInitialized == 0) return false; memoizedIsInitialized = 1; return true; } @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(key_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, key_); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(value_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 2, value_); } unknownFields.writeTo(output); } @java.lang.Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(key_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, key_); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(value_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, value_); } size += unknownFields.getSerializedSize(); memoizedSize = size; return size; } @java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } if (!(obj instanceof io.envoyproxy.envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry)) { return super.equals(obj); } io.envoyproxy.envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry other = (io.envoyproxy.envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry) obj; if (!getKey() .equals(other.getKey())) return false; if (!getValue() .equals(other.getValue())) return false; if (!unknownFields.equals(other.unknownFields)) return false; return true; } @java.lang.Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + KEY_FIELD_NUMBER; hash = (53 * hash) + getKey().hashCode(); hash = (37 * hash) + VALUE_FIELD_NUMBER; hash = (53 * hash) + getValue().hashCode(); hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; } public static io.envoyproxy.envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static io.envoyproxy.envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static io.envoyproxy.envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static io.envoyproxy.envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static io.envoyproxy.envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static io.envoyproxy.envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static io.envoyproxy.envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static io.envoyproxy.envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input, extensionRegistry); } public static io.envoyproxy.envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } public static io.envoyproxy.envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input, extensionRegistry); } public static io.envoyproxy.envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static io.envoyproxy.envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input, extensionRegistry); } @java.lang.Override public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder() { return DEFAULT_INSTANCE.toBuilder(); } public static Builder newBuilder(io.envoyproxy.envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } @java.lang.Override public Builder toBuilder() { return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); } @java.lang.Override protected Builder newBuilderForType( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } /** * Protobuf type {@code envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry) io.envoyproxy.envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.EntryOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return io.envoyproxy.envoy.extensions.common.ratelimit.v3.RatelimitProto.internal_static_envoy_extensions_common_ratelimit_v3_RateLimitDescriptor_Entry_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return io.envoyproxy.envoy.extensions.common.ratelimit.v3.RatelimitProto.internal_static_envoy_extensions_common_ratelimit_v3_RateLimitDescriptor_Entry_fieldAccessorTable .ensureFieldAccessorsInitialized( io.envoyproxy.envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry.class, io.envoyproxy.envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry.Builder.class); } // Construct using io.envoyproxy.envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry.newBuilder() private Builder() { maybeForceBuilderInitialization(); } private Builder( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessageV3 .alwaysUseFieldBuilders) { } } @java.lang.Override public Builder clear() { super.clear(); key_ = ""; value_ = ""; return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return io.envoyproxy.envoy.extensions.common.ratelimit.v3.RatelimitProto.internal_static_envoy_extensions_common_ratelimit_v3_RateLimitDescriptor_Entry_descriptor; } @java.lang.Override public io.envoyproxy.envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry getDefaultInstanceForType() { return io.envoyproxy.envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry.getDefaultInstance(); } @java.lang.Override public io.envoyproxy.envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry build() { io.envoyproxy.envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } @java.lang.Override public io.envoyproxy.envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry buildPartial() { io.envoyproxy.envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry result = new io.envoyproxy.envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry(this); result.key_ = key_; result.value_ = value_; onBuilt(); return result; } @java.lang.Override public Builder clone() { return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { return super.setField(field, value); } @java.lang.Override public Builder clearField( com.google.protobuf.Descriptors.FieldDescriptor field) { return super.clearField(field); } @java.lang.Override public Builder clearOneof( com.google.protobuf.Descriptors.OneofDescriptor oneof) { return super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { return super.addRepeatedField(field, value); } @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof io.envoyproxy.envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry) { return mergeFrom((io.envoyproxy.envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(io.envoyproxy.envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry other) { if (other == io.envoyproxy.envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry.getDefaultInstance()) return this; if (!other.getKey().isEmpty()) { key_ = other.key_; onChanged(); } if (!other.getValue().isEmpty()) { value_ = other.value_; onChanged(); } this.mergeUnknownFields(other.unknownFields); onChanged(); return this; } @java.lang.Override public final boolean isInitialized() { return true; } @java.lang.Override public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { io.envoyproxy.envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = (io.envoyproxy.envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { if (parsedMessage != null) { mergeFrom(parsedMessage); } } return this; } private java.lang.Object key_ = ""; /** *
       * Descriptor key.
       * 
* * string key = 1 [(.validate.rules) = { ... } * @return The key. */ public java.lang.String getKey() { java.lang.Object ref = key_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); key_ = s; return s; } else { return (java.lang.String) ref; } } /** *
       * Descriptor key.
       * 
* * string key = 1 [(.validate.rules) = { ... } * @return The bytes for key. */ public com.google.protobuf.ByteString getKeyBytes() { java.lang.Object ref = key_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); key_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** *
       * Descriptor key.
       * 
* * string key = 1 [(.validate.rules) = { ... } * @param value The key to set. * @return This builder for chaining. */ public Builder setKey( java.lang.String value) { if (value == null) { throw new NullPointerException(); } key_ = value; onChanged(); return this; } /** *
       * Descriptor key.
       * 
* * string key = 1 [(.validate.rules) = { ... } * @return This builder for chaining. */ public Builder clearKey() { key_ = getDefaultInstance().getKey(); onChanged(); return this; } /** *
       * Descriptor key.
       * 
* * string key = 1 [(.validate.rules) = { ... } * @param value The bytes for key to set. * @return This builder for chaining. */ public Builder setKeyBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); key_ = value; onChanged(); return this; } private java.lang.Object value_ = ""; /** *
       * Descriptor value.
       * 
* * string value = 2 [(.validate.rules) = { ... } * @return The value. */ public java.lang.String getValue() { java.lang.Object ref = value_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); value_ = s; return s; } else { return (java.lang.String) ref; } } /** *
       * Descriptor value.
       * 
* * string value = 2 [(.validate.rules) = { ... } * @return The bytes for value. */ public com.google.protobuf.ByteString getValueBytes() { java.lang.Object ref = value_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); value_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** *
       * Descriptor value.
       * 
* * string value = 2 [(.validate.rules) = { ... } * @param value The value to set. * @return This builder for chaining. */ public Builder setValue( java.lang.String value) { if (value == null) { throw new NullPointerException(); } value_ = value; onChanged(); return this; } /** *
       * Descriptor value.
       * 
* * string value = 2 [(.validate.rules) = { ... } * @return This builder for chaining. */ public Builder clearValue() { value_ = getDefaultInstance().getValue(); onChanged(); return this; } /** *
       * Descriptor value.
       * 
* * string value = 2 [(.validate.rules) = { ... } * @param value The bytes for value to set. * @return This builder for chaining. */ public Builder setValueBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); value_ = value; onChanged(); return this; } @java.lang.Override public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); } @java.lang.Override public final Builder mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return super.mergeUnknownFields(unknownFields); } // @@protoc_insertion_point(builder_scope:envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry) } // @@protoc_insertion_point(class_scope:envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry) private static final io.envoyproxy.envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new io.envoyproxy.envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry(); } public static io.envoyproxy.envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { @java.lang.Override public Entry parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return new Entry(input, extensionRegistry); } }; public static com.google.protobuf.Parser parser() { return PARSER; } @java.lang.Override public com.google.protobuf.Parser getParserForType() { return PARSER; } @java.lang.Override public io.envoyproxy.envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry getDefaultInstanceForType() { return DEFAULT_INSTANCE; } } public interface RateLimitOverrideOrBuilder extends // @@protoc_insertion_point(interface_extends:envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.RateLimitOverride) com.google.protobuf.MessageOrBuilder { /** *
     * The number of requests per unit of time.
     * 
* * uint32 requests_per_unit = 1; * @return The requestsPerUnit. */ int getRequestsPerUnit(); /** *
     * The unit of time.
     * 
* * .envoy.type.v3.RateLimitUnit unit = 2 [(.validate.rules) = { ... } * @return The enum numeric value on the wire for unit. */ int getUnitValue(); /** *
     * The unit of time.
     * 
* * .envoy.type.v3.RateLimitUnit unit = 2 [(.validate.rules) = { ... } * @return The unit. */ io.envoyproxy.envoy.type.v3.RateLimitUnit getUnit(); } /** *
   * Override rate limit to apply to this descriptor instead of the limit
   * configured in the rate limit service. See :ref:`rate limit override
   * <config_http_filters_rate_limit_rate_limit_override>` for more information.
   * 
* * Protobuf type {@code envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.RateLimitOverride} */ public static final class RateLimitOverride extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.RateLimitOverride) RateLimitOverrideOrBuilder { private static final long serialVersionUID = 0L; // Use RateLimitOverride.newBuilder() to construct. private RateLimitOverride(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } private RateLimitOverride() { unit_ = 0; } @java.lang.Override @SuppressWarnings({"unused"}) protected java.lang.Object newInstance( UnusedPrivateParameter unused) { return new RateLimitOverride(); } @java.lang.Override public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } private RateLimitOverride( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { this(); if (extensionRegistry == null) { throw new java.lang.NullPointerException(); } com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder(); try { boolean done = false; while (!done) { int tag = input.readTag(); switch (tag) { case 0: done = true; break; case 8: { requestsPerUnit_ = input.readUInt32(); break; } case 16: { int rawValue = input.readEnum(); unit_ = rawValue; break; } default: { if (!parseUnknownField( input, unknownFields, extensionRegistry, tag)) { done = true; } break; } } } } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.setUnfinishedMessage(this); } catch (com.google.protobuf.UninitializedMessageException e) { throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException( e).setUnfinishedMessage(this); } finally { this.unknownFields = unknownFields.build(); makeExtensionsImmutable(); } } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return io.envoyproxy.envoy.extensions.common.ratelimit.v3.RatelimitProto.internal_static_envoy_extensions_common_ratelimit_v3_RateLimitDescriptor_RateLimitOverride_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return io.envoyproxy.envoy.extensions.common.ratelimit.v3.RatelimitProto.internal_static_envoy_extensions_common_ratelimit_v3_RateLimitDescriptor_RateLimitOverride_fieldAccessorTable .ensureFieldAccessorsInitialized( io.envoyproxy.envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.RateLimitOverride.class, io.envoyproxy.envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.RateLimitOverride.Builder.class); } public static final int REQUESTS_PER_UNIT_FIELD_NUMBER = 1; private int requestsPerUnit_; /** *
     * The number of requests per unit of time.
     * 
* * uint32 requests_per_unit = 1; * @return The requestsPerUnit. */ @java.lang.Override public int getRequestsPerUnit() { return requestsPerUnit_; } public static final int UNIT_FIELD_NUMBER = 2; private int unit_; /** *
     * The unit of time.
     * 
* * .envoy.type.v3.RateLimitUnit unit = 2 [(.validate.rules) = { ... } * @return The enum numeric value on the wire for unit. */ @java.lang.Override public int getUnitValue() { return unit_; } /** *
     * The unit of time.
     * 
* * .envoy.type.v3.RateLimitUnit unit = 2 [(.validate.rules) = { ... } * @return The unit. */ @java.lang.Override public io.envoyproxy.envoy.type.v3.RateLimitUnit getUnit() { @SuppressWarnings("deprecation") io.envoyproxy.envoy.type.v3.RateLimitUnit result = io.envoyproxy.envoy.type.v3.RateLimitUnit.valueOf(unit_); return result == null ? io.envoyproxy.envoy.type.v3.RateLimitUnit.UNRECOGNIZED : result; } private byte memoizedIsInitialized = -1; @java.lang.Override public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized == 1) return true; if (isInitialized == 0) return false; memoizedIsInitialized = 1; return true; } @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { if (requestsPerUnit_ != 0) { output.writeUInt32(1, requestsPerUnit_); } if (unit_ != io.envoyproxy.envoy.type.v3.RateLimitUnit.UNKNOWN.getNumber()) { output.writeEnum(2, unit_); } unknownFields.writeTo(output); } @java.lang.Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; if (requestsPerUnit_ != 0) { size += com.google.protobuf.CodedOutputStream .computeUInt32Size(1, requestsPerUnit_); } if (unit_ != io.envoyproxy.envoy.type.v3.RateLimitUnit.UNKNOWN.getNumber()) { size += com.google.protobuf.CodedOutputStream .computeEnumSize(2, unit_); } size += unknownFields.getSerializedSize(); memoizedSize = size; return size; } @java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } if (!(obj instanceof io.envoyproxy.envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.RateLimitOverride)) { return super.equals(obj); } io.envoyproxy.envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.RateLimitOverride other = (io.envoyproxy.envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.RateLimitOverride) obj; if (getRequestsPerUnit() != other.getRequestsPerUnit()) return false; if (unit_ != other.unit_) return false; if (!unknownFields.equals(other.unknownFields)) return false; return true; } @java.lang.Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + REQUESTS_PER_UNIT_FIELD_NUMBER; hash = (53 * hash) + getRequestsPerUnit(); hash = (37 * hash) + UNIT_FIELD_NUMBER; hash = (53 * hash) + unit_; hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; } public static io.envoyproxy.envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.RateLimitOverride parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static io.envoyproxy.envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.RateLimitOverride parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static io.envoyproxy.envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.RateLimitOverride parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static io.envoyproxy.envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.RateLimitOverride parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static io.envoyproxy.envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.RateLimitOverride parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static io.envoyproxy.envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.RateLimitOverride parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static io.envoyproxy.envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.RateLimitOverride parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static io.envoyproxy.envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.RateLimitOverride parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input, extensionRegistry); } public static io.envoyproxy.envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.RateLimitOverride parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } public static io.envoyproxy.envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.RateLimitOverride parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input, extensionRegistry); } public static io.envoyproxy.envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.RateLimitOverride parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static io.envoyproxy.envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.RateLimitOverride parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input, extensionRegistry); } @java.lang.Override public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder() { return DEFAULT_INSTANCE.toBuilder(); } public static Builder newBuilder(io.envoyproxy.envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.RateLimitOverride prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } @java.lang.Override public Builder toBuilder() { return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); } @java.lang.Override protected Builder newBuilderForType( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } /** *
     * Override rate limit to apply to this descriptor instead of the limit
     * configured in the rate limit service. See :ref:`rate limit override
     * <config_http_filters_rate_limit_rate_limit_override>` for more information.
     * 
* * Protobuf type {@code envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.RateLimitOverride} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.RateLimitOverride) io.envoyproxy.envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.RateLimitOverrideOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return io.envoyproxy.envoy.extensions.common.ratelimit.v3.RatelimitProto.internal_static_envoy_extensions_common_ratelimit_v3_RateLimitDescriptor_RateLimitOverride_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return io.envoyproxy.envoy.extensions.common.ratelimit.v3.RatelimitProto.internal_static_envoy_extensions_common_ratelimit_v3_RateLimitDescriptor_RateLimitOverride_fieldAccessorTable .ensureFieldAccessorsInitialized( io.envoyproxy.envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.RateLimitOverride.class, io.envoyproxy.envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.RateLimitOverride.Builder.class); } // Construct using io.envoyproxy.envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.RateLimitOverride.newBuilder() private Builder() { maybeForceBuilderInitialization(); } private Builder( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessageV3 .alwaysUseFieldBuilders) { } } @java.lang.Override public Builder clear() { super.clear(); requestsPerUnit_ = 0; unit_ = 0; return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return io.envoyproxy.envoy.extensions.common.ratelimit.v3.RatelimitProto.internal_static_envoy_extensions_common_ratelimit_v3_RateLimitDescriptor_RateLimitOverride_descriptor; } @java.lang.Override public io.envoyproxy.envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.RateLimitOverride getDefaultInstanceForType() { return io.envoyproxy.envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.RateLimitOverride.getDefaultInstance(); } @java.lang.Override public io.envoyproxy.envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.RateLimitOverride build() { io.envoyproxy.envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.RateLimitOverride result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } @java.lang.Override public io.envoyproxy.envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.RateLimitOverride buildPartial() { io.envoyproxy.envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.RateLimitOverride result = new io.envoyproxy.envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.RateLimitOverride(this); result.requestsPerUnit_ = requestsPerUnit_; result.unit_ = unit_; onBuilt(); return result; } @java.lang.Override public Builder clone() { return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { return super.setField(field, value); } @java.lang.Override public Builder clearField( com.google.protobuf.Descriptors.FieldDescriptor field) { return super.clearField(field); } @java.lang.Override public Builder clearOneof( com.google.protobuf.Descriptors.OneofDescriptor oneof) { return super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { return super.addRepeatedField(field, value); } @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof io.envoyproxy.envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.RateLimitOverride) { return mergeFrom((io.envoyproxy.envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.RateLimitOverride)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(io.envoyproxy.envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.RateLimitOverride other) { if (other == io.envoyproxy.envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.RateLimitOverride.getDefaultInstance()) return this; if (other.getRequestsPerUnit() != 0) { setRequestsPerUnit(other.getRequestsPerUnit()); } if (other.unit_ != 0) { setUnitValue(other.getUnitValue()); } this.mergeUnknownFields(other.unknownFields); onChanged(); return this; } @java.lang.Override public final boolean isInitialized() { return true; } @java.lang.Override public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { io.envoyproxy.envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.RateLimitOverride parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = (io.envoyproxy.envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.RateLimitOverride) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { if (parsedMessage != null) { mergeFrom(parsedMessage); } } return this; } private int requestsPerUnit_ ; /** *
       * The number of requests per unit of time.
       * 
* * uint32 requests_per_unit = 1; * @return The requestsPerUnit. */ @java.lang.Override public int getRequestsPerUnit() { return requestsPerUnit_; } /** *
       * The number of requests per unit of time.
       * 
* * uint32 requests_per_unit = 1; * @param value The requestsPerUnit to set. * @return This builder for chaining. */ public Builder setRequestsPerUnit(int value) { requestsPerUnit_ = value; onChanged(); return this; } /** *
       * The number of requests per unit of time.
       * 
* * uint32 requests_per_unit = 1; * @return This builder for chaining. */ public Builder clearRequestsPerUnit() { requestsPerUnit_ = 0; onChanged(); return this; } private int unit_ = 0; /** *
       * The unit of time.
       * 
* * .envoy.type.v3.RateLimitUnit unit = 2 [(.validate.rules) = { ... } * @return The enum numeric value on the wire for unit. */ @java.lang.Override public int getUnitValue() { return unit_; } /** *
       * The unit of time.
       * 
* * .envoy.type.v3.RateLimitUnit unit = 2 [(.validate.rules) = { ... } * @param value The enum numeric value on the wire for unit to set. * @return This builder for chaining. */ public Builder setUnitValue(int value) { unit_ = value; onChanged(); return this; } /** *
       * The unit of time.
       * 
* * .envoy.type.v3.RateLimitUnit unit = 2 [(.validate.rules) = { ... } * @return The unit. */ @java.lang.Override public io.envoyproxy.envoy.type.v3.RateLimitUnit getUnit() { @SuppressWarnings("deprecation") io.envoyproxy.envoy.type.v3.RateLimitUnit result = io.envoyproxy.envoy.type.v3.RateLimitUnit.valueOf(unit_); return result == null ? io.envoyproxy.envoy.type.v3.RateLimitUnit.UNRECOGNIZED : result; } /** *
       * The unit of time.
       * 
* * .envoy.type.v3.RateLimitUnit unit = 2 [(.validate.rules) = { ... } * @param value The unit to set. * @return This builder for chaining. */ public Builder setUnit(io.envoyproxy.envoy.type.v3.RateLimitUnit value) { if (value == null) { throw new NullPointerException(); } unit_ = value.getNumber(); onChanged(); return this; } /** *
       * The unit of time.
       * 
* * .envoy.type.v3.RateLimitUnit unit = 2 [(.validate.rules) = { ... } * @return This builder for chaining. */ public Builder clearUnit() { unit_ = 0; onChanged(); return this; } @java.lang.Override public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); } @java.lang.Override public final Builder mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return super.mergeUnknownFields(unknownFields); } // @@protoc_insertion_point(builder_scope:envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.RateLimitOverride) } // @@protoc_insertion_point(class_scope:envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.RateLimitOverride) private static final io.envoyproxy.envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.RateLimitOverride DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new io.envoyproxy.envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.RateLimitOverride(); } public static io.envoyproxy.envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.RateLimitOverride getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { @java.lang.Override public RateLimitOverride parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return new RateLimitOverride(input, extensionRegistry); } }; public static com.google.protobuf.Parser parser() { return PARSER; } @java.lang.Override public com.google.protobuf.Parser getParserForType() { return PARSER; } @java.lang.Override public io.envoyproxy.envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.RateLimitOverride getDefaultInstanceForType() { return DEFAULT_INSTANCE; } } public static final int ENTRIES_FIELD_NUMBER = 1; private java.util.List entries_; /** *
   * Descriptor entries.
   * 
* * repeated .envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry entries = 1 [(.validate.rules) = { ... } */ @java.lang.Override public java.util.List getEntriesList() { return entries_; } /** *
   * Descriptor entries.
   * 
* * repeated .envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry entries = 1 [(.validate.rules) = { ... } */ @java.lang.Override public java.util.List getEntriesOrBuilderList() { return entries_; } /** *
   * Descriptor entries.
   * 
* * repeated .envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry entries = 1 [(.validate.rules) = { ... } */ @java.lang.Override public int getEntriesCount() { return entries_.size(); } /** *
   * Descriptor entries.
   * 
* * repeated .envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry entries = 1 [(.validate.rules) = { ... } */ @java.lang.Override public io.envoyproxy.envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry getEntries(int index) { return entries_.get(index); } /** *
   * Descriptor entries.
   * 
* * repeated .envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry entries = 1 [(.validate.rules) = { ... } */ @java.lang.Override public io.envoyproxy.envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.EntryOrBuilder getEntriesOrBuilder( int index) { return entries_.get(index); } public static final int LIMIT_FIELD_NUMBER = 2; private io.envoyproxy.envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.RateLimitOverride limit_; /** *
   * Optional rate limit override to supply to the ratelimit service.
   * 
* * .envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.RateLimitOverride limit = 2; * @return Whether the limit field is set. */ @java.lang.Override public boolean hasLimit() { return limit_ != null; } /** *
   * Optional rate limit override to supply to the ratelimit service.
   * 
* * .envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.RateLimitOverride limit = 2; * @return The limit. */ @java.lang.Override public io.envoyproxy.envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.RateLimitOverride getLimit() { return limit_ == null ? io.envoyproxy.envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.RateLimitOverride.getDefaultInstance() : limit_; } /** *
   * Optional rate limit override to supply to the ratelimit service.
   * 
* * .envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.RateLimitOverride limit = 2; */ @java.lang.Override public io.envoyproxy.envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.RateLimitOverrideOrBuilder getLimitOrBuilder() { return getLimit(); } private byte memoizedIsInitialized = -1; @java.lang.Override public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized == 1) return true; if (isInitialized == 0) return false; memoizedIsInitialized = 1; return true; } @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { for (int i = 0; i < entries_.size(); i++) { output.writeMessage(1, entries_.get(i)); } if (limit_ != null) { output.writeMessage(2, getLimit()); } unknownFields.writeTo(output); } @java.lang.Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; for (int i = 0; i < entries_.size(); i++) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(1, entries_.get(i)); } if (limit_ != null) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(2, getLimit()); } size += unknownFields.getSerializedSize(); memoizedSize = size; return size; } @java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } if (!(obj instanceof io.envoyproxy.envoy.extensions.common.ratelimit.v3.RateLimitDescriptor)) { return super.equals(obj); } io.envoyproxy.envoy.extensions.common.ratelimit.v3.RateLimitDescriptor other = (io.envoyproxy.envoy.extensions.common.ratelimit.v3.RateLimitDescriptor) obj; if (!getEntriesList() .equals(other.getEntriesList())) return false; if (hasLimit() != other.hasLimit()) return false; if (hasLimit()) { if (!getLimit() .equals(other.getLimit())) return false; } if (!unknownFields.equals(other.unknownFields)) return false; return true; } @java.lang.Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); if (getEntriesCount() > 0) { hash = (37 * hash) + ENTRIES_FIELD_NUMBER; hash = (53 * hash) + getEntriesList().hashCode(); } if (hasLimit()) { hash = (37 * hash) + LIMIT_FIELD_NUMBER; hash = (53 * hash) + getLimit().hashCode(); } hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; } public static io.envoyproxy.envoy.extensions.common.ratelimit.v3.RateLimitDescriptor parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static io.envoyproxy.envoy.extensions.common.ratelimit.v3.RateLimitDescriptor parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static io.envoyproxy.envoy.extensions.common.ratelimit.v3.RateLimitDescriptor parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static io.envoyproxy.envoy.extensions.common.ratelimit.v3.RateLimitDescriptor parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static io.envoyproxy.envoy.extensions.common.ratelimit.v3.RateLimitDescriptor parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static io.envoyproxy.envoy.extensions.common.ratelimit.v3.RateLimitDescriptor parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static io.envoyproxy.envoy.extensions.common.ratelimit.v3.RateLimitDescriptor parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static io.envoyproxy.envoy.extensions.common.ratelimit.v3.RateLimitDescriptor parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input, extensionRegistry); } public static io.envoyproxy.envoy.extensions.common.ratelimit.v3.RateLimitDescriptor parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } public static io.envoyproxy.envoy.extensions.common.ratelimit.v3.RateLimitDescriptor parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input, extensionRegistry); } public static io.envoyproxy.envoy.extensions.common.ratelimit.v3.RateLimitDescriptor parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static io.envoyproxy.envoy.extensions.common.ratelimit.v3.RateLimitDescriptor parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input, extensionRegistry); } @java.lang.Override public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder() { return DEFAULT_INSTANCE.toBuilder(); } public static Builder newBuilder(io.envoyproxy.envoy.extensions.common.ratelimit.v3.RateLimitDescriptor prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } @java.lang.Override public Builder toBuilder() { return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); } @java.lang.Override protected Builder newBuilderForType( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } /** *
   * A RateLimitDescriptor is a list of hierarchical entries that are used by the service to
   * determine the final rate limit key and overall allowed limit. Here are some examples of how
   * they might be used for the domain "envoy".
   * .. code-block:: cpp
   *   ["authenticated": "false"], ["remote_address": "10.0.0.1"]
   * What it does: Limits all unauthenticated traffic for the IP address 10.0.0.1. The
   * configuration supplies a default limit for the *remote_address* key. If there is a desire to
   * raise the limit for 10.0.0.1 or block it entirely it can be specified directly in the
   * configuration.
   * .. code-block:: cpp
   *   ["authenticated": "false"], ["path": "/foo/bar"]
   * What it does: Limits all unauthenticated traffic globally for a specific path (or prefix if
   * configured that way in the service).
   * .. code-block:: cpp
   *   ["authenticated": "false"], ["path": "/foo/bar"], ["remote_address": "10.0.0.1"]
   * What it does: Limits unauthenticated traffic to a specific path for a specific IP address.
   * Like (1) we can raise/block specific IP addresses if we want with an override configuration.
   * .. code-block:: cpp
   *   ["authenticated": "true"], ["client_id": "foo"]
   * What it does: Limits all traffic for an authenticated client "foo"
   * .. code-block:: cpp
   *   ["authenticated": "true"], ["client_id": "foo"], ["path": "/foo/bar"]
   * What it does: Limits traffic to a specific path for an authenticated client "foo"
   * The idea behind the API is that (1)/(2)/(3) and (4)/(5) can be sent in 1 request if desired.
   * This enables building complex application scenarios with a generic backend.
   * Optionally the descriptor can contain a limit override under a "limit" key, that specifies
   * the number of requests per unit to use instead of the number configured in the
   * rate limiting service.
   * 
* * Protobuf type {@code envoy.extensions.common.ratelimit.v3.RateLimitDescriptor} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:envoy.extensions.common.ratelimit.v3.RateLimitDescriptor) io.envoyproxy.envoy.extensions.common.ratelimit.v3.RateLimitDescriptorOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return io.envoyproxy.envoy.extensions.common.ratelimit.v3.RatelimitProto.internal_static_envoy_extensions_common_ratelimit_v3_RateLimitDescriptor_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return io.envoyproxy.envoy.extensions.common.ratelimit.v3.RatelimitProto.internal_static_envoy_extensions_common_ratelimit_v3_RateLimitDescriptor_fieldAccessorTable .ensureFieldAccessorsInitialized( io.envoyproxy.envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.class, io.envoyproxy.envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Builder.class); } // Construct using io.envoyproxy.envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.newBuilder() private Builder() { maybeForceBuilderInitialization(); } private Builder( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessageV3 .alwaysUseFieldBuilders) { getEntriesFieldBuilder(); } } @java.lang.Override public Builder clear() { super.clear(); if (entriesBuilder_ == null) { entries_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00000001); } else { entriesBuilder_.clear(); } if (limitBuilder_ == null) { limit_ = null; } else { limit_ = null; limitBuilder_ = null; } return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return io.envoyproxy.envoy.extensions.common.ratelimit.v3.RatelimitProto.internal_static_envoy_extensions_common_ratelimit_v3_RateLimitDescriptor_descriptor; } @java.lang.Override public io.envoyproxy.envoy.extensions.common.ratelimit.v3.RateLimitDescriptor getDefaultInstanceForType() { return io.envoyproxy.envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.getDefaultInstance(); } @java.lang.Override public io.envoyproxy.envoy.extensions.common.ratelimit.v3.RateLimitDescriptor build() { io.envoyproxy.envoy.extensions.common.ratelimit.v3.RateLimitDescriptor result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } @java.lang.Override public io.envoyproxy.envoy.extensions.common.ratelimit.v3.RateLimitDescriptor buildPartial() { io.envoyproxy.envoy.extensions.common.ratelimit.v3.RateLimitDescriptor result = new io.envoyproxy.envoy.extensions.common.ratelimit.v3.RateLimitDescriptor(this); int from_bitField0_ = bitField0_; if (entriesBuilder_ == null) { if (((bitField0_ & 0x00000001) != 0)) { entries_ = java.util.Collections.unmodifiableList(entries_); bitField0_ = (bitField0_ & ~0x00000001); } result.entries_ = entries_; } else { result.entries_ = entriesBuilder_.build(); } if (limitBuilder_ == null) { result.limit_ = limit_; } else { result.limit_ = limitBuilder_.build(); } onBuilt(); return result; } @java.lang.Override public Builder clone() { return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { return super.setField(field, value); } @java.lang.Override public Builder clearField( com.google.protobuf.Descriptors.FieldDescriptor field) { return super.clearField(field); } @java.lang.Override public Builder clearOneof( com.google.protobuf.Descriptors.OneofDescriptor oneof) { return super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { return super.addRepeatedField(field, value); } @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof io.envoyproxy.envoy.extensions.common.ratelimit.v3.RateLimitDescriptor) { return mergeFrom((io.envoyproxy.envoy.extensions.common.ratelimit.v3.RateLimitDescriptor)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(io.envoyproxy.envoy.extensions.common.ratelimit.v3.RateLimitDescriptor other) { if (other == io.envoyproxy.envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.getDefaultInstance()) return this; if (entriesBuilder_ == null) { if (!other.entries_.isEmpty()) { if (entries_.isEmpty()) { entries_ = other.entries_; bitField0_ = (bitField0_ & ~0x00000001); } else { ensureEntriesIsMutable(); entries_.addAll(other.entries_); } onChanged(); } } else { if (!other.entries_.isEmpty()) { if (entriesBuilder_.isEmpty()) { entriesBuilder_.dispose(); entriesBuilder_ = null; entries_ = other.entries_; bitField0_ = (bitField0_ & ~0x00000001); entriesBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? getEntriesFieldBuilder() : null; } else { entriesBuilder_.addAllMessages(other.entries_); } } } if (other.hasLimit()) { mergeLimit(other.getLimit()); } this.mergeUnknownFields(other.unknownFields); onChanged(); return this; } @java.lang.Override public final boolean isInitialized() { return true; } @java.lang.Override public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { io.envoyproxy.envoy.extensions.common.ratelimit.v3.RateLimitDescriptor parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = (io.envoyproxy.envoy.extensions.common.ratelimit.v3.RateLimitDescriptor) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { if (parsedMessage != null) { mergeFrom(parsedMessage); } } return this; } private int bitField0_; private java.util.List entries_ = java.util.Collections.emptyList(); private void ensureEntriesIsMutable() { if (!((bitField0_ & 0x00000001) != 0)) { entries_ = new java.util.ArrayList(entries_); bitField0_ |= 0x00000001; } } private com.google.protobuf.RepeatedFieldBuilderV3< io.envoyproxy.envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry, io.envoyproxy.envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry.Builder, io.envoyproxy.envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.EntryOrBuilder> entriesBuilder_; /** *
     * Descriptor entries.
     * 
* * repeated .envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry entries = 1 [(.validate.rules) = { ... } */ public java.util.List getEntriesList() { if (entriesBuilder_ == null) { return java.util.Collections.unmodifiableList(entries_); } else { return entriesBuilder_.getMessageList(); } } /** *
     * Descriptor entries.
     * 
* * repeated .envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry entries = 1 [(.validate.rules) = { ... } */ public int getEntriesCount() { if (entriesBuilder_ == null) { return entries_.size(); } else { return entriesBuilder_.getCount(); } } /** *
     * Descriptor entries.
     * 
* * repeated .envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry entries = 1 [(.validate.rules) = { ... } */ public io.envoyproxy.envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry getEntries(int index) { if (entriesBuilder_ == null) { return entries_.get(index); } else { return entriesBuilder_.getMessage(index); } } /** *
     * Descriptor entries.
     * 
* * repeated .envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry entries = 1 [(.validate.rules) = { ... } */ public Builder setEntries( int index, io.envoyproxy.envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry value) { if (entriesBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureEntriesIsMutable(); entries_.set(index, value); onChanged(); } else { entriesBuilder_.setMessage(index, value); } return this; } /** *
     * Descriptor entries.
     * 
* * repeated .envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry entries = 1 [(.validate.rules) = { ... } */ public Builder setEntries( int index, io.envoyproxy.envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry.Builder builderForValue) { if (entriesBuilder_ == null) { ensureEntriesIsMutable(); entries_.set(index, builderForValue.build()); onChanged(); } else { entriesBuilder_.setMessage(index, builderForValue.build()); } return this; } /** *
     * Descriptor entries.
     * 
* * repeated .envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry entries = 1 [(.validate.rules) = { ... } */ public Builder addEntries(io.envoyproxy.envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry value) { if (entriesBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureEntriesIsMutable(); entries_.add(value); onChanged(); } else { entriesBuilder_.addMessage(value); } return this; } /** *
     * Descriptor entries.
     * 
* * repeated .envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry entries = 1 [(.validate.rules) = { ... } */ public Builder addEntries( int index, io.envoyproxy.envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry value) { if (entriesBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureEntriesIsMutable(); entries_.add(index, value); onChanged(); } else { entriesBuilder_.addMessage(index, value); } return this; } /** *
     * Descriptor entries.
     * 
* * repeated .envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry entries = 1 [(.validate.rules) = { ... } */ public Builder addEntries( io.envoyproxy.envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry.Builder builderForValue) { if (entriesBuilder_ == null) { ensureEntriesIsMutable(); entries_.add(builderForValue.build()); onChanged(); } else { entriesBuilder_.addMessage(builderForValue.build()); } return this; } /** *
     * Descriptor entries.
     * 
* * repeated .envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry entries = 1 [(.validate.rules) = { ... } */ public Builder addEntries( int index, io.envoyproxy.envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry.Builder builderForValue) { if (entriesBuilder_ == null) { ensureEntriesIsMutable(); entries_.add(index, builderForValue.build()); onChanged(); } else { entriesBuilder_.addMessage(index, builderForValue.build()); } return this; } /** *
     * Descriptor entries.
     * 
* * repeated .envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry entries = 1 [(.validate.rules) = { ... } */ public Builder addAllEntries( java.lang.Iterable values) { if (entriesBuilder_ == null) { ensureEntriesIsMutable(); com.google.protobuf.AbstractMessageLite.Builder.addAll( values, entries_); onChanged(); } else { entriesBuilder_.addAllMessages(values); } return this; } /** *
     * Descriptor entries.
     * 
* * repeated .envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry entries = 1 [(.validate.rules) = { ... } */ public Builder clearEntries() { if (entriesBuilder_ == null) { entries_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00000001); onChanged(); } else { entriesBuilder_.clear(); } return this; } /** *
     * Descriptor entries.
     * 
* * repeated .envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry entries = 1 [(.validate.rules) = { ... } */ public Builder removeEntries(int index) { if (entriesBuilder_ == null) { ensureEntriesIsMutable(); entries_.remove(index); onChanged(); } else { entriesBuilder_.remove(index); } return this; } /** *
     * Descriptor entries.
     * 
* * repeated .envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry entries = 1 [(.validate.rules) = { ... } */ public io.envoyproxy.envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry.Builder getEntriesBuilder( int index) { return getEntriesFieldBuilder().getBuilder(index); } /** *
     * Descriptor entries.
     * 
* * repeated .envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry entries = 1 [(.validate.rules) = { ... } */ public io.envoyproxy.envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.EntryOrBuilder getEntriesOrBuilder( int index) { if (entriesBuilder_ == null) { return entries_.get(index); } else { return entriesBuilder_.getMessageOrBuilder(index); } } /** *
     * Descriptor entries.
     * 
* * repeated .envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry entries = 1 [(.validate.rules) = { ... } */ public java.util.List getEntriesOrBuilderList() { if (entriesBuilder_ != null) { return entriesBuilder_.getMessageOrBuilderList(); } else { return java.util.Collections.unmodifiableList(entries_); } } /** *
     * Descriptor entries.
     * 
* * repeated .envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry entries = 1 [(.validate.rules) = { ... } */ public io.envoyproxy.envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry.Builder addEntriesBuilder() { return getEntriesFieldBuilder().addBuilder( io.envoyproxy.envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry.getDefaultInstance()); } /** *
     * Descriptor entries.
     * 
* * repeated .envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry entries = 1 [(.validate.rules) = { ... } */ public io.envoyproxy.envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry.Builder addEntriesBuilder( int index) { return getEntriesFieldBuilder().addBuilder( index, io.envoyproxy.envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry.getDefaultInstance()); } /** *
     * Descriptor entries.
     * 
* * repeated .envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry entries = 1 [(.validate.rules) = { ... } */ public java.util.List getEntriesBuilderList() { return getEntriesFieldBuilder().getBuilderList(); } private com.google.protobuf.RepeatedFieldBuilderV3< io.envoyproxy.envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry, io.envoyproxy.envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry.Builder, io.envoyproxy.envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.EntryOrBuilder> getEntriesFieldBuilder() { if (entriesBuilder_ == null) { entriesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< io.envoyproxy.envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry, io.envoyproxy.envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry.Builder, io.envoyproxy.envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.EntryOrBuilder>( entries_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); entries_ = null; } return entriesBuilder_; } private io.envoyproxy.envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.RateLimitOverride limit_; private com.google.protobuf.SingleFieldBuilderV3< io.envoyproxy.envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.RateLimitOverride, io.envoyproxy.envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.RateLimitOverride.Builder, io.envoyproxy.envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.RateLimitOverrideOrBuilder> limitBuilder_; /** *
     * Optional rate limit override to supply to the ratelimit service.
     * 
* * .envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.RateLimitOverride limit = 2; * @return Whether the limit field is set. */ public boolean hasLimit() { return limitBuilder_ != null || limit_ != null; } /** *
     * Optional rate limit override to supply to the ratelimit service.
     * 
* * .envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.RateLimitOverride limit = 2; * @return The limit. */ public io.envoyproxy.envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.RateLimitOverride getLimit() { if (limitBuilder_ == null) { return limit_ == null ? io.envoyproxy.envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.RateLimitOverride.getDefaultInstance() : limit_; } else { return limitBuilder_.getMessage(); } } /** *
     * Optional rate limit override to supply to the ratelimit service.
     * 
* * .envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.RateLimitOverride limit = 2; */ public Builder setLimit(io.envoyproxy.envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.RateLimitOverride value) { if (limitBuilder_ == null) { if (value == null) { throw new NullPointerException(); } limit_ = value; onChanged(); } else { limitBuilder_.setMessage(value); } return this; } /** *
     * Optional rate limit override to supply to the ratelimit service.
     * 
* * .envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.RateLimitOverride limit = 2; */ public Builder setLimit( io.envoyproxy.envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.RateLimitOverride.Builder builderForValue) { if (limitBuilder_ == null) { limit_ = builderForValue.build(); onChanged(); } else { limitBuilder_.setMessage(builderForValue.build()); } return this; } /** *
     * Optional rate limit override to supply to the ratelimit service.
     * 
* * .envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.RateLimitOverride limit = 2; */ public Builder mergeLimit(io.envoyproxy.envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.RateLimitOverride value) { if (limitBuilder_ == null) { if (limit_ != null) { limit_ = io.envoyproxy.envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.RateLimitOverride.newBuilder(limit_).mergeFrom(value).buildPartial(); } else { limit_ = value; } onChanged(); } else { limitBuilder_.mergeFrom(value); } return this; } /** *
     * Optional rate limit override to supply to the ratelimit service.
     * 
* * .envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.RateLimitOverride limit = 2; */ public Builder clearLimit() { if (limitBuilder_ == null) { limit_ = null; onChanged(); } else { limit_ = null; limitBuilder_ = null; } return this; } /** *
     * Optional rate limit override to supply to the ratelimit service.
     * 
* * .envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.RateLimitOverride limit = 2; */ public io.envoyproxy.envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.RateLimitOverride.Builder getLimitBuilder() { onChanged(); return getLimitFieldBuilder().getBuilder(); } /** *
     * Optional rate limit override to supply to the ratelimit service.
     * 
* * .envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.RateLimitOverride limit = 2; */ public io.envoyproxy.envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.RateLimitOverrideOrBuilder getLimitOrBuilder() { if (limitBuilder_ != null) { return limitBuilder_.getMessageOrBuilder(); } else { return limit_ == null ? io.envoyproxy.envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.RateLimitOverride.getDefaultInstance() : limit_; } } /** *
     * Optional rate limit override to supply to the ratelimit service.
     * 
* * .envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.RateLimitOverride limit = 2; */ private com.google.protobuf.SingleFieldBuilderV3< io.envoyproxy.envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.RateLimitOverride, io.envoyproxy.envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.RateLimitOverride.Builder, io.envoyproxy.envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.RateLimitOverrideOrBuilder> getLimitFieldBuilder() { if (limitBuilder_ == null) { limitBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< io.envoyproxy.envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.RateLimitOverride, io.envoyproxy.envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.RateLimitOverride.Builder, io.envoyproxy.envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.RateLimitOverrideOrBuilder>( getLimit(), getParentForChildren(), isClean()); limit_ = null; } return limitBuilder_; } @java.lang.Override public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); } @java.lang.Override public final Builder mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return super.mergeUnknownFields(unknownFields); } // @@protoc_insertion_point(builder_scope:envoy.extensions.common.ratelimit.v3.RateLimitDescriptor) } // @@protoc_insertion_point(class_scope:envoy.extensions.common.ratelimit.v3.RateLimitDescriptor) private static final io.envoyproxy.envoy.extensions.common.ratelimit.v3.RateLimitDescriptor DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new io.envoyproxy.envoy.extensions.common.ratelimit.v3.RateLimitDescriptor(); } public static io.envoyproxy.envoy.extensions.common.ratelimit.v3.RateLimitDescriptor getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { @java.lang.Override public RateLimitDescriptor parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return new RateLimitDescriptor(input, extensionRegistry); } }; public static com.google.protobuf.Parser parser() { return PARSER; } @java.lang.Override public com.google.protobuf.Parser getParserForType() { return PARSER; } @java.lang.Override public io.envoyproxy.envoy.extensions.common.ratelimit.v3.RateLimitDescriptor getDefaultInstanceForType() { return DEFAULT_INSTANCE; } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy