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

io.envoyproxy.envoy.service.ratelimit.v3.RateLimitResponse 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/service/ratelimit/v3/rls.proto

package io.envoyproxy.envoy.service.ratelimit.v3;

/**
 * 
 * A response from a ShouldRateLimit call.
 * [#next-free-field: 8]
 * 
* * Protobuf type {@code envoy.service.ratelimit.v3.RateLimitResponse} */ public final class RateLimitResponse extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:envoy.service.ratelimit.v3.RateLimitResponse) RateLimitResponseOrBuilder { private static final long serialVersionUID = 0L; // Use RateLimitResponse.newBuilder() to construct. private RateLimitResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } private RateLimitResponse() { overallCode_ = 0; statuses_ = java.util.Collections.emptyList(); responseHeadersToAdd_ = java.util.Collections.emptyList(); requestHeadersToAdd_ = java.util.Collections.emptyList(); rawBody_ = com.google.protobuf.ByteString.EMPTY; } @java.lang.Override @SuppressWarnings({"unused"}) protected java.lang.Object newInstance( UnusedPrivateParameter unused) { return new RateLimitResponse(); } @java.lang.Override public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } private RateLimitResponse( 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 8: { int rawValue = input.readEnum(); overallCode_ = rawValue; break; } case 18: { if (!((mutable_bitField0_ & 0x00000001) != 0)) { statuses_ = new java.util.ArrayList(); mutable_bitField0_ |= 0x00000001; } statuses_.add( input.readMessage(io.envoyproxy.envoy.service.ratelimit.v3.RateLimitResponse.DescriptorStatus.parser(), extensionRegistry)); break; } case 26: { if (!((mutable_bitField0_ & 0x00000002) != 0)) { responseHeadersToAdd_ = new java.util.ArrayList(); mutable_bitField0_ |= 0x00000002; } responseHeadersToAdd_.add( input.readMessage(io.envoyproxy.envoy.config.core.v3.HeaderValue.parser(), extensionRegistry)); break; } case 34: { if (!((mutable_bitField0_ & 0x00000004) != 0)) { requestHeadersToAdd_ = new java.util.ArrayList(); mutable_bitField0_ |= 0x00000004; } requestHeadersToAdd_.add( input.readMessage(io.envoyproxy.envoy.config.core.v3.HeaderValue.parser(), extensionRegistry)); break; } case 42: { rawBody_ = input.readBytes(); break; } case 50: { com.google.protobuf.Struct.Builder subBuilder = null; if (dynamicMetadata_ != null) { subBuilder = dynamicMetadata_.toBuilder(); } dynamicMetadata_ = input.readMessage(com.google.protobuf.Struct.parser(), extensionRegistry); if (subBuilder != null) { subBuilder.mergeFrom(dynamicMetadata_); dynamicMetadata_ = subBuilder.buildPartial(); } break; } case 58: { io.envoyproxy.envoy.service.ratelimit.v3.RateLimitResponse.Quota.Builder subBuilder = null; if (quota_ != null) { subBuilder = quota_.toBuilder(); } quota_ = input.readMessage(io.envoyproxy.envoy.service.ratelimit.v3.RateLimitResponse.Quota.parser(), extensionRegistry); if (subBuilder != null) { subBuilder.mergeFrom(quota_); quota_ = 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)) { statuses_ = java.util.Collections.unmodifiableList(statuses_); } if (((mutable_bitField0_ & 0x00000002) != 0)) { responseHeadersToAdd_ = java.util.Collections.unmodifiableList(responseHeadersToAdd_); } if (((mutable_bitField0_ & 0x00000004) != 0)) { requestHeadersToAdd_ = java.util.Collections.unmodifiableList(requestHeadersToAdd_); } this.unknownFields = unknownFields.build(); makeExtensionsImmutable(); } } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return io.envoyproxy.envoy.service.ratelimit.v3.RlsProto.internal_static_envoy_service_ratelimit_v3_RateLimitResponse_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return io.envoyproxy.envoy.service.ratelimit.v3.RlsProto.internal_static_envoy_service_ratelimit_v3_RateLimitResponse_fieldAccessorTable .ensureFieldAccessorsInitialized( io.envoyproxy.envoy.service.ratelimit.v3.RateLimitResponse.class, io.envoyproxy.envoy.service.ratelimit.v3.RateLimitResponse.Builder.class); } /** * Protobuf enum {@code envoy.service.ratelimit.v3.RateLimitResponse.Code} */ public enum Code implements com.google.protobuf.ProtocolMessageEnum { /** *
     * The response code is not known.
     * 
* * UNKNOWN = 0; */ UNKNOWN(0), /** *
     * The response code to notify that the number of requests are under limit.
     * 
* * OK = 1; */ OK(1), /** *
     * The response code to notify that the number of requests are over limit.
     * 
* * OVER_LIMIT = 2; */ OVER_LIMIT(2), UNRECOGNIZED(-1), ; /** *
     * The response code is not known.
     * 
* * UNKNOWN = 0; */ public static final int UNKNOWN_VALUE = 0; /** *
     * The response code to notify that the number of requests are under limit.
     * 
* * OK = 1; */ public static final int OK_VALUE = 1; /** *
     * The response code to notify that the number of requests are over limit.
     * 
* * OVER_LIMIT = 2; */ public static final int OVER_LIMIT_VALUE = 2; public final int getNumber() { if (this == UNRECOGNIZED) { throw new java.lang.IllegalArgumentException( "Can't get the number of an unknown enum value."); } return value; } /** * @param value The numeric wire value of the corresponding enum entry. * @return The enum associated with the given numeric wire value. * @deprecated Use {@link #forNumber(int)} instead. */ @java.lang.Deprecated public static Code valueOf(int value) { return forNumber(value); } /** * @param value The numeric wire value of the corresponding enum entry. * @return The enum associated with the given numeric wire value. */ public static Code forNumber(int value) { switch (value) { case 0: return UNKNOWN; case 1: return OK; case 2: return OVER_LIMIT; default: return null; } } public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { return internalValueMap; } private static final com.google.protobuf.Internal.EnumLiteMap< Code> internalValueMap = new com.google.protobuf.Internal.EnumLiteMap() { public Code findValueByNumber(int number) { return Code.forNumber(number); } }; public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { if (this == UNRECOGNIZED) { throw new java.lang.IllegalStateException( "Can't get the descriptor of an unrecognized enum value."); } return getDescriptor().getValues().get(ordinal()); } public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { return getDescriptor(); } public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { return io.envoyproxy.envoy.service.ratelimit.v3.RateLimitResponse.getDescriptor().getEnumTypes().get(0); } private static final Code[] VALUES = values(); public static Code valueOf( com.google.protobuf.Descriptors.EnumValueDescriptor desc) { if (desc.getType() != getDescriptor()) { throw new java.lang.IllegalArgumentException( "EnumValueDescriptor is not for this type."); } if (desc.getIndex() == -1) { return UNRECOGNIZED; } return VALUES[desc.getIndex()]; } private final int value; private Code(int value) { this.value = value; } // @@protoc_insertion_point(enum_scope:envoy.service.ratelimit.v3.RateLimitResponse.Code) } public interface RateLimitOrBuilder extends // @@protoc_insertion_point(interface_extends:envoy.service.ratelimit.v3.RateLimitResponse.RateLimit) com.google.protobuf.MessageOrBuilder { /** *
     * A name or description of this limit.
     * 
* * string name = 3; * @return The name. */ java.lang.String getName(); /** *
     * A name or description of this limit.
     * 
* * string name = 3; * @return The bytes for name. */ com.google.protobuf.ByteString getNameBytes(); /** *
     * The number of requests per unit of time.
     * 
* * uint32 requests_per_unit = 1; * @return The requestsPerUnit. */ int getRequestsPerUnit(); /** *
     * The unit of time.
     * 
* * .envoy.service.ratelimit.v3.RateLimitResponse.RateLimit.Unit unit = 2; * @return The enum numeric value on the wire for unit. */ int getUnitValue(); /** *
     * The unit of time.
     * 
* * .envoy.service.ratelimit.v3.RateLimitResponse.RateLimit.Unit unit = 2; * @return The unit. */ io.envoyproxy.envoy.service.ratelimit.v3.RateLimitResponse.RateLimit.Unit getUnit(); } /** *
   * Defines an actual rate limit in terms of requests per unit of time and the unit itself.
   * 
* * Protobuf type {@code envoy.service.ratelimit.v3.RateLimitResponse.RateLimit} */ public static final class RateLimit extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:envoy.service.ratelimit.v3.RateLimitResponse.RateLimit) RateLimitOrBuilder { private static final long serialVersionUID = 0L; // Use RateLimit.newBuilder() to construct. private RateLimit(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } private RateLimit() { name_ = ""; unit_ = 0; } @java.lang.Override @SuppressWarnings({"unused"}) protected java.lang.Object newInstance( UnusedPrivateParameter unused) { return new RateLimit(); } @java.lang.Override public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } private RateLimit( 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; } case 26: { java.lang.String s = input.readStringRequireUtf8(); name_ = 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.service.ratelimit.v3.RlsProto.internal_static_envoy_service_ratelimit_v3_RateLimitResponse_RateLimit_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return io.envoyproxy.envoy.service.ratelimit.v3.RlsProto.internal_static_envoy_service_ratelimit_v3_RateLimitResponse_RateLimit_fieldAccessorTable .ensureFieldAccessorsInitialized( io.envoyproxy.envoy.service.ratelimit.v3.RateLimitResponse.RateLimit.class, io.envoyproxy.envoy.service.ratelimit.v3.RateLimitResponse.RateLimit.Builder.class); } /** *
     * Identifies the unit of of time for rate limit.
     * [#comment: replace by envoy/type/v3/ratelimit_unit.proto in v4]
     * 
* * Protobuf enum {@code envoy.service.ratelimit.v3.RateLimitResponse.RateLimit.Unit} */ public enum Unit implements com.google.protobuf.ProtocolMessageEnum { /** *
       * The time unit is not known.
       * 
* * UNKNOWN = 0; */ UNKNOWN(0), /** *
       * The time unit representing a second.
       * 
* * SECOND = 1; */ SECOND(1), /** *
       * The time unit representing a minute.
       * 
* * MINUTE = 2; */ MINUTE(2), /** *
       * The time unit representing an hour.
       * 
* * HOUR = 3; */ HOUR(3), /** *
       * The time unit representing a day.
       * 
* * DAY = 4; */ DAY(4), /** *
       * The time unit representing a month.
       * 
* * MONTH = 5; */ MONTH(5), /** *
       * The time unit representing a year.
       * 
* * YEAR = 6; */ YEAR(6), UNRECOGNIZED(-1), ; /** *
       * The time unit is not known.
       * 
* * UNKNOWN = 0; */ public static final int UNKNOWN_VALUE = 0; /** *
       * The time unit representing a second.
       * 
* * SECOND = 1; */ public static final int SECOND_VALUE = 1; /** *
       * The time unit representing a minute.
       * 
* * MINUTE = 2; */ public static final int MINUTE_VALUE = 2; /** *
       * The time unit representing an hour.
       * 
* * HOUR = 3; */ public static final int HOUR_VALUE = 3; /** *
       * The time unit representing a day.
       * 
* * DAY = 4; */ public static final int DAY_VALUE = 4; /** *
       * The time unit representing a month.
       * 
* * MONTH = 5; */ public static final int MONTH_VALUE = 5; /** *
       * The time unit representing a year.
       * 
* * YEAR = 6; */ public static final int YEAR_VALUE = 6; public final int getNumber() { if (this == UNRECOGNIZED) { throw new java.lang.IllegalArgumentException( "Can't get the number of an unknown enum value."); } return value; } /** * @param value The numeric wire value of the corresponding enum entry. * @return The enum associated with the given numeric wire value. * @deprecated Use {@link #forNumber(int)} instead. */ @java.lang.Deprecated public static Unit valueOf(int value) { return forNumber(value); } /** * @param value The numeric wire value of the corresponding enum entry. * @return The enum associated with the given numeric wire value. */ public static Unit forNumber(int value) { switch (value) { case 0: return UNKNOWN; case 1: return SECOND; case 2: return MINUTE; case 3: return HOUR; case 4: return DAY; case 5: return MONTH; case 6: return YEAR; default: return null; } } public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { return internalValueMap; } private static final com.google.protobuf.Internal.EnumLiteMap< Unit> internalValueMap = new com.google.protobuf.Internal.EnumLiteMap() { public Unit findValueByNumber(int number) { return Unit.forNumber(number); } }; public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { if (this == UNRECOGNIZED) { throw new java.lang.IllegalStateException( "Can't get the descriptor of an unrecognized enum value."); } return getDescriptor().getValues().get(ordinal()); } public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { return getDescriptor(); } public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { return io.envoyproxy.envoy.service.ratelimit.v3.RateLimitResponse.RateLimit.getDescriptor().getEnumTypes().get(0); } private static final Unit[] VALUES = values(); public static Unit valueOf( com.google.protobuf.Descriptors.EnumValueDescriptor desc) { if (desc.getType() != getDescriptor()) { throw new java.lang.IllegalArgumentException( "EnumValueDescriptor is not for this type."); } if (desc.getIndex() == -1) { return UNRECOGNIZED; } return VALUES[desc.getIndex()]; } private final int value; private Unit(int value) { this.value = value; } // @@protoc_insertion_point(enum_scope:envoy.service.ratelimit.v3.RateLimitResponse.RateLimit.Unit) } public static final int NAME_FIELD_NUMBER = 3; private volatile java.lang.Object name_; /** *
     * A name or description of this limit.
     * 
* * string name = 3; * @return The name. */ @java.lang.Override public java.lang.String getName() { java.lang.Object ref = name_; 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(); name_ = s; return s; } } /** *
     * A name or description of this limit.
     * 
* * string name = 3; * @return The bytes for name. */ @java.lang.Override public com.google.protobuf.ByteString getNameBytes() { java.lang.Object ref = name_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); name_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } 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.service.ratelimit.v3.RateLimitResponse.RateLimit.Unit unit = 2; * @return The enum numeric value on the wire for unit. */ @java.lang.Override public int getUnitValue() { return unit_; } /** *
     * The unit of time.
     * 
* * .envoy.service.ratelimit.v3.RateLimitResponse.RateLimit.Unit unit = 2; * @return The unit. */ @java.lang.Override public io.envoyproxy.envoy.service.ratelimit.v3.RateLimitResponse.RateLimit.Unit getUnit() { @SuppressWarnings("deprecation") io.envoyproxy.envoy.service.ratelimit.v3.RateLimitResponse.RateLimit.Unit result = io.envoyproxy.envoy.service.ratelimit.v3.RateLimitResponse.RateLimit.Unit.valueOf(unit_); return result == null ? io.envoyproxy.envoy.service.ratelimit.v3.RateLimitResponse.RateLimit.Unit.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.service.ratelimit.v3.RateLimitResponse.RateLimit.Unit.UNKNOWN.getNumber()) { output.writeEnum(2, unit_); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 3, name_); } 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.service.ratelimit.v3.RateLimitResponse.RateLimit.Unit.UNKNOWN.getNumber()) { size += com.google.protobuf.CodedOutputStream .computeEnumSize(2, unit_); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, name_); } 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.service.ratelimit.v3.RateLimitResponse.RateLimit)) { return super.equals(obj); } io.envoyproxy.envoy.service.ratelimit.v3.RateLimitResponse.RateLimit other = (io.envoyproxy.envoy.service.ratelimit.v3.RateLimitResponse.RateLimit) obj; if (!getName() .equals(other.getName())) return false; 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) + NAME_FIELD_NUMBER; hash = (53 * hash) + getName().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.service.ratelimit.v3.RateLimitResponse.RateLimit parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static io.envoyproxy.envoy.service.ratelimit.v3.RateLimitResponse.RateLimit 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.service.ratelimit.v3.RateLimitResponse.RateLimit parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static io.envoyproxy.envoy.service.ratelimit.v3.RateLimitResponse.RateLimit 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.service.ratelimit.v3.RateLimitResponse.RateLimit parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static io.envoyproxy.envoy.service.ratelimit.v3.RateLimitResponse.RateLimit parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static io.envoyproxy.envoy.service.ratelimit.v3.RateLimitResponse.RateLimit parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static io.envoyproxy.envoy.service.ratelimit.v3.RateLimitResponse.RateLimit 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.service.ratelimit.v3.RateLimitResponse.RateLimit parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } public static io.envoyproxy.envoy.service.ratelimit.v3.RateLimitResponse.RateLimit 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.service.ratelimit.v3.RateLimitResponse.RateLimit parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static io.envoyproxy.envoy.service.ratelimit.v3.RateLimitResponse.RateLimit 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.service.ratelimit.v3.RateLimitResponse.RateLimit 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; } /** *
     * Defines an actual rate limit in terms of requests per unit of time and the unit itself.
     * 
* * Protobuf type {@code envoy.service.ratelimit.v3.RateLimitResponse.RateLimit} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:envoy.service.ratelimit.v3.RateLimitResponse.RateLimit) io.envoyproxy.envoy.service.ratelimit.v3.RateLimitResponse.RateLimitOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return io.envoyproxy.envoy.service.ratelimit.v3.RlsProto.internal_static_envoy_service_ratelimit_v3_RateLimitResponse_RateLimit_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return io.envoyproxy.envoy.service.ratelimit.v3.RlsProto.internal_static_envoy_service_ratelimit_v3_RateLimitResponse_RateLimit_fieldAccessorTable .ensureFieldAccessorsInitialized( io.envoyproxy.envoy.service.ratelimit.v3.RateLimitResponse.RateLimit.class, io.envoyproxy.envoy.service.ratelimit.v3.RateLimitResponse.RateLimit.Builder.class); } // Construct using io.envoyproxy.envoy.service.ratelimit.v3.RateLimitResponse.RateLimit.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(); name_ = ""; requestsPerUnit_ = 0; unit_ = 0; return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return io.envoyproxy.envoy.service.ratelimit.v3.RlsProto.internal_static_envoy_service_ratelimit_v3_RateLimitResponse_RateLimit_descriptor; } @java.lang.Override public io.envoyproxy.envoy.service.ratelimit.v3.RateLimitResponse.RateLimit getDefaultInstanceForType() { return io.envoyproxy.envoy.service.ratelimit.v3.RateLimitResponse.RateLimit.getDefaultInstance(); } @java.lang.Override public io.envoyproxy.envoy.service.ratelimit.v3.RateLimitResponse.RateLimit build() { io.envoyproxy.envoy.service.ratelimit.v3.RateLimitResponse.RateLimit result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } @java.lang.Override public io.envoyproxy.envoy.service.ratelimit.v3.RateLimitResponse.RateLimit buildPartial() { io.envoyproxy.envoy.service.ratelimit.v3.RateLimitResponse.RateLimit result = new io.envoyproxy.envoy.service.ratelimit.v3.RateLimitResponse.RateLimit(this); result.name_ = name_; 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.service.ratelimit.v3.RateLimitResponse.RateLimit) { return mergeFrom((io.envoyproxy.envoy.service.ratelimit.v3.RateLimitResponse.RateLimit)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(io.envoyproxy.envoy.service.ratelimit.v3.RateLimitResponse.RateLimit other) { if (other == io.envoyproxy.envoy.service.ratelimit.v3.RateLimitResponse.RateLimit.getDefaultInstance()) return this; if (!other.getName().isEmpty()) { name_ = other.name_; onChanged(); } 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.service.ratelimit.v3.RateLimitResponse.RateLimit parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = (io.envoyproxy.envoy.service.ratelimit.v3.RateLimitResponse.RateLimit) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { if (parsedMessage != null) { mergeFrom(parsedMessage); } } return this; } private java.lang.Object name_ = ""; /** *
       * A name or description of this limit.
       * 
* * string name = 3; * @return The name. */ public java.lang.String getName() { java.lang.Object ref = name_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); name_ = s; return s; } else { return (java.lang.String) ref; } } /** *
       * A name or description of this limit.
       * 
* * string name = 3; * @return The bytes for name. */ public com.google.protobuf.ByteString getNameBytes() { java.lang.Object ref = name_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); name_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** *
       * A name or description of this limit.
       * 
* * string name = 3; * @param value The name to set. * @return This builder for chaining. */ public Builder setName( java.lang.String value) { if (value == null) { throw new NullPointerException(); } name_ = value; onChanged(); return this; } /** *
       * A name or description of this limit.
       * 
* * string name = 3; * @return This builder for chaining. */ public Builder clearName() { name_ = getDefaultInstance().getName(); onChanged(); return this; } /** *
       * A name or description of this limit.
       * 
* * string name = 3; * @param value The bytes for name to set. * @return This builder for chaining. */ public Builder setNameBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); name_ = value; onChanged(); 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.service.ratelimit.v3.RateLimitResponse.RateLimit.Unit unit = 2; * @return The enum numeric value on the wire for unit. */ @java.lang.Override public int getUnitValue() { return unit_; } /** *
       * The unit of time.
       * 
* * .envoy.service.ratelimit.v3.RateLimitResponse.RateLimit.Unit unit = 2; * @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.service.ratelimit.v3.RateLimitResponse.RateLimit.Unit unit = 2; * @return The unit. */ @java.lang.Override public io.envoyproxy.envoy.service.ratelimit.v3.RateLimitResponse.RateLimit.Unit getUnit() { @SuppressWarnings("deprecation") io.envoyproxy.envoy.service.ratelimit.v3.RateLimitResponse.RateLimit.Unit result = io.envoyproxy.envoy.service.ratelimit.v3.RateLimitResponse.RateLimit.Unit.valueOf(unit_); return result == null ? io.envoyproxy.envoy.service.ratelimit.v3.RateLimitResponse.RateLimit.Unit.UNRECOGNIZED : result; } /** *
       * The unit of time.
       * 
* * .envoy.service.ratelimit.v3.RateLimitResponse.RateLimit.Unit unit = 2; * @param value The unit to set. * @return This builder for chaining. */ public Builder setUnit(io.envoyproxy.envoy.service.ratelimit.v3.RateLimitResponse.RateLimit.Unit value) { if (value == null) { throw new NullPointerException(); } unit_ = value.getNumber(); onChanged(); return this; } /** *
       * The unit of time.
       * 
* * .envoy.service.ratelimit.v3.RateLimitResponse.RateLimit.Unit unit = 2; * @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.service.ratelimit.v3.RateLimitResponse.RateLimit) } // @@protoc_insertion_point(class_scope:envoy.service.ratelimit.v3.RateLimitResponse.RateLimit) private static final io.envoyproxy.envoy.service.ratelimit.v3.RateLimitResponse.RateLimit DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new io.envoyproxy.envoy.service.ratelimit.v3.RateLimitResponse.RateLimit(); } public static io.envoyproxy.envoy.service.ratelimit.v3.RateLimitResponse.RateLimit getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { @java.lang.Override public RateLimit parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return new RateLimit(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.service.ratelimit.v3.RateLimitResponse.RateLimit getDefaultInstanceForType() { return DEFAULT_INSTANCE; } } public interface QuotaOrBuilder extends // @@protoc_insertion_point(interface_extends:envoy.service.ratelimit.v3.RateLimitResponse.Quota) com.google.protobuf.MessageOrBuilder { /** *
     * Number of matching requests granted in quota. Must be 1 or more.
     * 
* * uint32 requests = 1 [(.validate.rules) = { ... } * @return The requests. */ int getRequests(); /** *
     * Point in time at which the quota expires.
     * 
* * .google.protobuf.Timestamp valid_until = 2; * @return Whether the validUntil field is set. */ boolean hasValidUntil(); /** *
     * Point in time at which the quota expires.
     * 
* * .google.protobuf.Timestamp valid_until = 2; * @return The validUntil. */ com.google.protobuf.Timestamp getValidUntil(); /** *
     * Point in time at which the quota expires.
     * 
* * .google.protobuf.Timestamp valid_until = 2; */ com.google.protobuf.TimestampOrBuilder getValidUntilOrBuilder(); /** *
     * The unique id that is associated with each Quota either at individual descriptor level or whole descriptor set level.
     * For a matching policy with boolean logic, for example, match: "request.headers['environment'] == 'staging' || request.headers['environment'] == 'dev'"),
     * the request_headers action produces a distinct list of descriptors for each possible value of the ‘environment’ header even though the granted quota is same.
     * Thus, the client will use this id information (returned from RLS server) to correctly correlate the multiple descriptors/descriptor sets that have been granted with same quota (i.e., share the same quota among multiple descriptors or descriptor sets.)
     * If id is empty, this id field will be ignored. If quota for the same id changes (e.g. due to configuration update), the old quota will be overridden by the new one. Shared quotas referenced by ID will still adhere to expiration after `valid_until`.
     * 
* * string id = 3; * @return The id. */ java.lang.String getId(); /** *
     * The unique id that is associated with each Quota either at individual descriptor level or whole descriptor set level.
     * For a matching policy with boolean logic, for example, match: "request.headers['environment'] == 'staging' || request.headers['environment'] == 'dev'"),
     * the request_headers action produces a distinct list of descriptors for each possible value of the ‘environment’ header even though the granted quota is same.
     * Thus, the client will use this id information (returned from RLS server) to correctly correlate the multiple descriptors/descriptor sets that have been granted with same quota (i.e., share the same quota among multiple descriptors or descriptor sets.)
     * If id is empty, this id field will be ignored. If quota for the same id changes (e.g. due to configuration update), the old quota will be overridden by the new one. Shared quotas referenced by ID will still adhere to expiration after `valid_until`.
     * 
* * string id = 3; * @return The bytes for id. */ com.google.protobuf.ByteString getIdBytes(); public io.envoyproxy.envoy.service.ratelimit.v3.RateLimitResponse.Quota.ExpirationSpecifierCase getExpirationSpecifierCase(); } /** *
   * Cacheable quota for responses.
   * Quota can be granted at different levels: either for each individual descriptor or for the whole descriptor set.
   * This is a certain number of requests over a period of time.
   * The client may cache this result and apply the effective RateLimitResponse to future matching
   * requests without querying rate limit service.
   * When quota expires due to timeout, a new RLS request will also be made.
   * The implementation may choose to preemptively query the rate limit server for more quota on or
   * before expiration or before the available quota runs out.
   * [#not-implemented-hide:]
   * 
* * Protobuf type {@code envoy.service.ratelimit.v3.RateLimitResponse.Quota} */ public static final class Quota extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:envoy.service.ratelimit.v3.RateLimitResponse.Quota) QuotaOrBuilder { private static final long serialVersionUID = 0L; // Use Quota.newBuilder() to construct. private Quota(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } private Quota() { id_ = ""; } @java.lang.Override @SuppressWarnings({"unused"}) protected java.lang.Object newInstance( UnusedPrivateParameter unused) { return new Quota(); } @java.lang.Override public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } private Quota( 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: { requests_ = input.readUInt32(); break; } case 18: { com.google.protobuf.Timestamp.Builder subBuilder = null; if (expirationSpecifierCase_ == 2) { subBuilder = ((com.google.protobuf.Timestamp) expirationSpecifier_).toBuilder(); } expirationSpecifier_ = input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); if (subBuilder != null) { subBuilder.mergeFrom((com.google.protobuf.Timestamp) expirationSpecifier_); expirationSpecifier_ = subBuilder.buildPartial(); } expirationSpecifierCase_ = 2; break; } case 26: { java.lang.String s = input.readStringRequireUtf8(); id_ = 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.service.ratelimit.v3.RlsProto.internal_static_envoy_service_ratelimit_v3_RateLimitResponse_Quota_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return io.envoyproxy.envoy.service.ratelimit.v3.RlsProto.internal_static_envoy_service_ratelimit_v3_RateLimitResponse_Quota_fieldAccessorTable .ensureFieldAccessorsInitialized( io.envoyproxy.envoy.service.ratelimit.v3.RateLimitResponse.Quota.class, io.envoyproxy.envoy.service.ratelimit.v3.RateLimitResponse.Quota.Builder.class); } private int expirationSpecifierCase_ = 0; private java.lang.Object expirationSpecifier_; public enum ExpirationSpecifierCase implements com.google.protobuf.Internal.EnumLite, com.google.protobuf.AbstractMessage.InternalOneOfEnum { VALID_UNTIL(2), EXPIRATIONSPECIFIER_NOT_SET(0); private final int value; private ExpirationSpecifierCase(int value) { this.value = value; } /** * @param value The number of the enum to look for. * @return The enum associated with the given number. * @deprecated Use {@link #forNumber(int)} instead. */ @java.lang.Deprecated public static ExpirationSpecifierCase valueOf(int value) { return forNumber(value); } public static ExpirationSpecifierCase forNumber(int value) { switch (value) { case 2: return VALID_UNTIL; case 0: return EXPIRATIONSPECIFIER_NOT_SET; default: return null; } } public int getNumber() { return this.value; } }; public ExpirationSpecifierCase getExpirationSpecifierCase() { return ExpirationSpecifierCase.forNumber( expirationSpecifierCase_); } public static final int REQUESTS_FIELD_NUMBER = 1; private int requests_; /** *
     * Number of matching requests granted in quota. Must be 1 or more.
     * 
* * uint32 requests = 1 [(.validate.rules) = { ... } * @return The requests. */ @java.lang.Override public int getRequests() { return requests_; } public static final int VALID_UNTIL_FIELD_NUMBER = 2; /** *
     * Point in time at which the quota expires.
     * 
* * .google.protobuf.Timestamp valid_until = 2; * @return Whether the validUntil field is set. */ @java.lang.Override public boolean hasValidUntil() { return expirationSpecifierCase_ == 2; } /** *
     * Point in time at which the quota expires.
     * 
* * .google.protobuf.Timestamp valid_until = 2; * @return The validUntil. */ @java.lang.Override public com.google.protobuf.Timestamp getValidUntil() { if (expirationSpecifierCase_ == 2) { return (com.google.protobuf.Timestamp) expirationSpecifier_; } return com.google.protobuf.Timestamp.getDefaultInstance(); } /** *
     * Point in time at which the quota expires.
     * 
* * .google.protobuf.Timestamp valid_until = 2; */ @java.lang.Override public com.google.protobuf.TimestampOrBuilder getValidUntilOrBuilder() { if (expirationSpecifierCase_ == 2) { return (com.google.protobuf.Timestamp) expirationSpecifier_; } return com.google.protobuf.Timestamp.getDefaultInstance(); } public static final int ID_FIELD_NUMBER = 3; private volatile java.lang.Object id_; /** *
     * The unique id that is associated with each Quota either at individual descriptor level or whole descriptor set level.
     * For a matching policy with boolean logic, for example, match: "request.headers['environment'] == 'staging' || request.headers['environment'] == 'dev'"),
     * the request_headers action produces a distinct list of descriptors for each possible value of the ‘environment’ header even though the granted quota is same.
     * Thus, the client will use this id information (returned from RLS server) to correctly correlate the multiple descriptors/descriptor sets that have been granted with same quota (i.e., share the same quota among multiple descriptors or descriptor sets.)
     * If id is empty, this id field will be ignored. If quota for the same id changes (e.g. due to configuration update), the old quota will be overridden by the new one. Shared quotas referenced by ID will still adhere to expiration after `valid_until`.
     * 
* * string id = 3; * @return The id. */ @java.lang.Override public java.lang.String getId() { java.lang.Object ref = id_; 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(); id_ = s; return s; } } /** *
     * The unique id that is associated with each Quota either at individual descriptor level or whole descriptor set level.
     * For a matching policy with boolean logic, for example, match: "request.headers['environment'] == 'staging' || request.headers['environment'] == 'dev'"),
     * the request_headers action produces a distinct list of descriptors for each possible value of the ‘environment’ header even though the granted quota is same.
     * Thus, the client will use this id information (returned from RLS server) to correctly correlate the multiple descriptors/descriptor sets that have been granted with same quota (i.e., share the same quota among multiple descriptors or descriptor sets.)
     * If id is empty, this id field will be ignored. If quota for the same id changes (e.g. due to configuration update), the old quota will be overridden by the new one. Shared quotas referenced by ID will still adhere to expiration after `valid_until`.
     * 
* * string id = 3; * @return The bytes for id. */ @java.lang.Override public com.google.protobuf.ByteString getIdBytes() { java.lang.Object ref = id_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); id_ = 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 (requests_ != 0) { output.writeUInt32(1, requests_); } if (expirationSpecifierCase_ == 2) { output.writeMessage(2, (com.google.protobuf.Timestamp) expirationSpecifier_); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 3, id_); } unknownFields.writeTo(output); } @java.lang.Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; if (requests_ != 0) { size += com.google.protobuf.CodedOutputStream .computeUInt32Size(1, requests_); } if (expirationSpecifierCase_ == 2) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(2, (com.google.protobuf.Timestamp) expirationSpecifier_); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, id_); } 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.service.ratelimit.v3.RateLimitResponse.Quota)) { return super.equals(obj); } io.envoyproxy.envoy.service.ratelimit.v3.RateLimitResponse.Quota other = (io.envoyproxy.envoy.service.ratelimit.v3.RateLimitResponse.Quota) obj; if (getRequests() != other.getRequests()) return false; if (!getId() .equals(other.getId())) return false; if (!getExpirationSpecifierCase().equals(other.getExpirationSpecifierCase())) return false; switch (expirationSpecifierCase_) { case 2: if (!getValidUntil() .equals(other.getValidUntil())) return false; break; case 0: default: } 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_FIELD_NUMBER; hash = (53 * hash) + getRequests(); hash = (37 * hash) + ID_FIELD_NUMBER; hash = (53 * hash) + getId().hashCode(); switch (expirationSpecifierCase_) { case 2: hash = (37 * hash) + VALID_UNTIL_FIELD_NUMBER; hash = (53 * hash) + getValidUntil().hashCode(); break; case 0: default: } hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; } public static io.envoyproxy.envoy.service.ratelimit.v3.RateLimitResponse.Quota parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static io.envoyproxy.envoy.service.ratelimit.v3.RateLimitResponse.Quota 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.service.ratelimit.v3.RateLimitResponse.Quota parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static io.envoyproxy.envoy.service.ratelimit.v3.RateLimitResponse.Quota 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.service.ratelimit.v3.RateLimitResponse.Quota parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static io.envoyproxy.envoy.service.ratelimit.v3.RateLimitResponse.Quota parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static io.envoyproxy.envoy.service.ratelimit.v3.RateLimitResponse.Quota parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static io.envoyproxy.envoy.service.ratelimit.v3.RateLimitResponse.Quota 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.service.ratelimit.v3.RateLimitResponse.Quota parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } public static io.envoyproxy.envoy.service.ratelimit.v3.RateLimitResponse.Quota 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.service.ratelimit.v3.RateLimitResponse.Quota parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static io.envoyproxy.envoy.service.ratelimit.v3.RateLimitResponse.Quota 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.service.ratelimit.v3.RateLimitResponse.Quota 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; } /** *
     * Cacheable quota for responses.
     * Quota can be granted at different levels: either for each individual descriptor or for the whole descriptor set.
     * This is a certain number of requests over a period of time.
     * The client may cache this result and apply the effective RateLimitResponse to future matching
     * requests without querying rate limit service.
     * When quota expires due to timeout, a new RLS request will also be made.
     * The implementation may choose to preemptively query the rate limit server for more quota on or
     * before expiration or before the available quota runs out.
     * [#not-implemented-hide:]
     * 
* * Protobuf type {@code envoy.service.ratelimit.v3.RateLimitResponse.Quota} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:envoy.service.ratelimit.v3.RateLimitResponse.Quota) io.envoyproxy.envoy.service.ratelimit.v3.RateLimitResponse.QuotaOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return io.envoyproxy.envoy.service.ratelimit.v3.RlsProto.internal_static_envoy_service_ratelimit_v3_RateLimitResponse_Quota_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return io.envoyproxy.envoy.service.ratelimit.v3.RlsProto.internal_static_envoy_service_ratelimit_v3_RateLimitResponse_Quota_fieldAccessorTable .ensureFieldAccessorsInitialized( io.envoyproxy.envoy.service.ratelimit.v3.RateLimitResponse.Quota.class, io.envoyproxy.envoy.service.ratelimit.v3.RateLimitResponse.Quota.Builder.class); } // Construct using io.envoyproxy.envoy.service.ratelimit.v3.RateLimitResponse.Quota.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(); requests_ = 0; id_ = ""; expirationSpecifierCase_ = 0; expirationSpecifier_ = null; return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return io.envoyproxy.envoy.service.ratelimit.v3.RlsProto.internal_static_envoy_service_ratelimit_v3_RateLimitResponse_Quota_descriptor; } @java.lang.Override public io.envoyproxy.envoy.service.ratelimit.v3.RateLimitResponse.Quota getDefaultInstanceForType() { return io.envoyproxy.envoy.service.ratelimit.v3.RateLimitResponse.Quota.getDefaultInstance(); } @java.lang.Override public io.envoyproxy.envoy.service.ratelimit.v3.RateLimitResponse.Quota build() { io.envoyproxy.envoy.service.ratelimit.v3.RateLimitResponse.Quota result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } @java.lang.Override public io.envoyproxy.envoy.service.ratelimit.v3.RateLimitResponse.Quota buildPartial() { io.envoyproxy.envoy.service.ratelimit.v3.RateLimitResponse.Quota result = new io.envoyproxy.envoy.service.ratelimit.v3.RateLimitResponse.Quota(this); result.requests_ = requests_; if (expirationSpecifierCase_ == 2) { if (validUntilBuilder_ == null) { result.expirationSpecifier_ = expirationSpecifier_; } else { result.expirationSpecifier_ = validUntilBuilder_.build(); } } result.id_ = id_; result.expirationSpecifierCase_ = expirationSpecifierCase_; 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.service.ratelimit.v3.RateLimitResponse.Quota) { return mergeFrom((io.envoyproxy.envoy.service.ratelimit.v3.RateLimitResponse.Quota)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(io.envoyproxy.envoy.service.ratelimit.v3.RateLimitResponse.Quota other) { if (other == io.envoyproxy.envoy.service.ratelimit.v3.RateLimitResponse.Quota.getDefaultInstance()) return this; if (other.getRequests() != 0) { setRequests(other.getRequests()); } if (!other.getId().isEmpty()) { id_ = other.id_; onChanged(); } switch (other.getExpirationSpecifierCase()) { case VALID_UNTIL: { mergeValidUntil(other.getValidUntil()); break; } case EXPIRATIONSPECIFIER_NOT_SET: { break; } } 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.service.ratelimit.v3.RateLimitResponse.Quota parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = (io.envoyproxy.envoy.service.ratelimit.v3.RateLimitResponse.Quota) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { if (parsedMessage != null) { mergeFrom(parsedMessage); } } return this; } private int expirationSpecifierCase_ = 0; private java.lang.Object expirationSpecifier_; public ExpirationSpecifierCase getExpirationSpecifierCase() { return ExpirationSpecifierCase.forNumber( expirationSpecifierCase_); } public Builder clearExpirationSpecifier() { expirationSpecifierCase_ = 0; expirationSpecifier_ = null; onChanged(); return this; } private int requests_ ; /** *
       * Number of matching requests granted in quota. Must be 1 or more.
       * 
* * uint32 requests = 1 [(.validate.rules) = { ... } * @return The requests. */ @java.lang.Override public int getRequests() { return requests_; } /** *
       * Number of matching requests granted in quota. Must be 1 or more.
       * 
* * uint32 requests = 1 [(.validate.rules) = { ... } * @param value The requests to set. * @return This builder for chaining. */ public Builder setRequests(int value) { requests_ = value; onChanged(); return this; } /** *
       * Number of matching requests granted in quota. Must be 1 or more.
       * 
* * uint32 requests = 1 [(.validate.rules) = { ... } * @return This builder for chaining. */ public Builder clearRequests() { requests_ = 0; onChanged(); return this; } private com.google.protobuf.SingleFieldBuilderV3< com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> validUntilBuilder_; /** *
       * Point in time at which the quota expires.
       * 
* * .google.protobuf.Timestamp valid_until = 2; * @return Whether the validUntil field is set. */ @java.lang.Override public boolean hasValidUntil() { return expirationSpecifierCase_ == 2; } /** *
       * Point in time at which the quota expires.
       * 
* * .google.protobuf.Timestamp valid_until = 2; * @return The validUntil. */ @java.lang.Override public com.google.protobuf.Timestamp getValidUntil() { if (validUntilBuilder_ == null) { if (expirationSpecifierCase_ == 2) { return (com.google.protobuf.Timestamp) expirationSpecifier_; } return com.google.protobuf.Timestamp.getDefaultInstance(); } else { if (expirationSpecifierCase_ == 2) { return validUntilBuilder_.getMessage(); } return com.google.protobuf.Timestamp.getDefaultInstance(); } } /** *
       * Point in time at which the quota expires.
       * 
* * .google.protobuf.Timestamp valid_until = 2; */ public Builder setValidUntil(com.google.protobuf.Timestamp value) { if (validUntilBuilder_ == null) { if (value == null) { throw new NullPointerException(); } expirationSpecifier_ = value; onChanged(); } else { validUntilBuilder_.setMessage(value); } expirationSpecifierCase_ = 2; return this; } /** *
       * Point in time at which the quota expires.
       * 
* * .google.protobuf.Timestamp valid_until = 2; */ public Builder setValidUntil( com.google.protobuf.Timestamp.Builder builderForValue) { if (validUntilBuilder_ == null) { expirationSpecifier_ = builderForValue.build(); onChanged(); } else { validUntilBuilder_.setMessage(builderForValue.build()); } expirationSpecifierCase_ = 2; return this; } /** *
       * Point in time at which the quota expires.
       * 
* * .google.protobuf.Timestamp valid_until = 2; */ public Builder mergeValidUntil(com.google.protobuf.Timestamp value) { if (validUntilBuilder_ == null) { if (expirationSpecifierCase_ == 2 && expirationSpecifier_ != com.google.protobuf.Timestamp.getDefaultInstance()) { expirationSpecifier_ = com.google.protobuf.Timestamp.newBuilder((com.google.protobuf.Timestamp) expirationSpecifier_) .mergeFrom(value).buildPartial(); } else { expirationSpecifier_ = value; } onChanged(); } else { if (expirationSpecifierCase_ == 2) { validUntilBuilder_.mergeFrom(value); } else { validUntilBuilder_.setMessage(value); } } expirationSpecifierCase_ = 2; return this; } /** *
       * Point in time at which the quota expires.
       * 
* * .google.protobuf.Timestamp valid_until = 2; */ public Builder clearValidUntil() { if (validUntilBuilder_ == null) { if (expirationSpecifierCase_ == 2) { expirationSpecifierCase_ = 0; expirationSpecifier_ = null; onChanged(); } } else { if (expirationSpecifierCase_ == 2) { expirationSpecifierCase_ = 0; expirationSpecifier_ = null; } validUntilBuilder_.clear(); } return this; } /** *
       * Point in time at which the quota expires.
       * 
* * .google.protobuf.Timestamp valid_until = 2; */ public com.google.protobuf.Timestamp.Builder getValidUntilBuilder() { return getValidUntilFieldBuilder().getBuilder(); } /** *
       * Point in time at which the quota expires.
       * 
* * .google.protobuf.Timestamp valid_until = 2; */ @java.lang.Override public com.google.protobuf.TimestampOrBuilder getValidUntilOrBuilder() { if ((expirationSpecifierCase_ == 2) && (validUntilBuilder_ != null)) { return validUntilBuilder_.getMessageOrBuilder(); } else { if (expirationSpecifierCase_ == 2) { return (com.google.protobuf.Timestamp) expirationSpecifier_; } return com.google.protobuf.Timestamp.getDefaultInstance(); } } /** *
       * Point in time at which the quota expires.
       * 
* * .google.protobuf.Timestamp valid_until = 2; */ private com.google.protobuf.SingleFieldBuilderV3< com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> getValidUntilFieldBuilder() { if (validUntilBuilder_ == null) { if (!(expirationSpecifierCase_ == 2)) { expirationSpecifier_ = com.google.protobuf.Timestamp.getDefaultInstance(); } validUntilBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( (com.google.protobuf.Timestamp) expirationSpecifier_, getParentForChildren(), isClean()); expirationSpecifier_ = null; } expirationSpecifierCase_ = 2; onChanged();; return validUntilBuilder_; } private java.lang.Object id_ = ""; /** *
       * The unique id that is associated with each Quota either at individual descriptor level or whole descriptor set level.
       * For a matching policy with boolean logic, for example, match: "request.headers['environment'] == 'staging' || request.headers['environment'] == 'dev'"),
       * the request_headers action produces a distinct list of descriptors for each possible value of the ‘environment’ header even though the granted quota is same.
       * Thus, the client will use this id information (returned from RLS server) to correctly correlate the multiple descriptors/descriptor sets that have been granted with same quota (i.e., share the same quota among multiple descriptors or descriptor sets.)
       * If id is empty, this id field will be ignored. If quota for the same id changes (e.g. due to configuration update), the old quota will be overridden by the new one. Shared quotas referenced by ID will still adhere to expiration after `valid_until`.
       * 
* * string id = 3; * @return The id. */ public java.lang.String getId() { java.lang.Object ref = id_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); id_ = s; return s; } else { return (java.lang.String) ref; } } /** *
       * The unique id that is associated with each Quota either at individual descriptor level or whole descriptor set level.
       * For a matching policy with boolean logic, for example, match: "request.headers['environment'] == 'staging' || request.headers['environment'] == 'dev'"),
       * the request_headers action produces a distinct list of descriptors for each possible value of the ‘environment’ header even though the granted quota is same.
       * Thus, the client will use this id information (returned from RLS server) to correctly correlate the multiple descriptors/descriptor sets that have been granted with same quota (i.e., share the same quota among multiple descriptors or descriptor sets.)
       * If id is empty, this id field will be ignored. If quota for the same id changes (e.g. due to configuration update), the old quota will be overridden by the new one. Shared quotas referenced by ID will still adhere to expiration after `valid_until`.
       * 
* * string id = 3; * @return The bytes for id. */ public com.google.protobuf.ByteString getIdBytes() { java.lang.Object ref = id_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); id_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** *
       * The unique id that is associated with each Quota either at individual descriptor level or whole descriptor set level.
       * For a matching policy with boolean logic, for example, match: "request.headers['environment'] == 'staging' || request.headers['environment'] == 'dev'"),
       * the request_headers action produces a distinct list of descriptors for each possible value of the ‘environment’ header even though the granted quota is same.
       * Thus, the client will use this id information (returned from RLS server) to correctly correlate the multiple descriptors/descriptor sets that have been granted with same quota (i.e., share the same quota among multiple descriptors or descriptor sets.)
       * If id is empty, this id field will be ignored. If quota for the same id changes (e.g. due to configuration update), the old quota will be overridden by the new one. Shared quotas referenced by ID will still adhere to expiration after `valid_until`.
       * 
* * string id = 3; * @param value The id to set. * @return This builder for chaining. */ public Builder setId( java.lang.String value) { if (value == null) { throw new NullPointerException(); } id_ = value; onChanged(); return this; } /** *
       * The unique id that is associated with each Quota either at individual descriptor level or whole descriptor set level.
       * For a matching policy with boolean logic, for example, match: "request.headers['environment'] == 'staging' || request.headers['environment'] == 'dev'"),
       * the request_headers action produces a distinct list of descriptors for each possible value of the ‘environment’ header even though the granted quota is same.
       * Thus, the client will use this id information (returned from RLS server) to correctly correlate the multiple descriptors/descriptor sets that have been granted with same quota (i.e., share the same quota among multiple descriptors or descriptor sets.)
       * If id is empty, this id field will be ignored. If quota for the same id changes (e.g. due to configuration update), the old quota will be overridden by the new one. Shared quotas referenced by ID will still adhere to expiration after `valid_until`.
       * 
* * string id = 3; * @return This builder for chaining. */ public Builder clearId() { id_ = getDefaultInstance().getId(); onChanged(); return this; } /** *
       * The unique id that is associated with each Quota either at individual descriptor level or whole descriptor set level.
       * For a matching policy with boolean logic, for example, match: "request.headers['environment'] == 'staging' || request.headers['environment'] == 'dev'"),
       * the request_headers action produces a distinct list of descriptors for each possible value of the ‘environment’ header even though the granted quota is same.
       * Thus, the client will use this id information (returned from RLS server) to correctly correlate the multiple descriptors/descriptor sets that have been granted with same quota (i.e., share the same quota among multiple descriptors or descriptor sets.)
       * If id is empty, this id field will be ignored. If quota for the same id changes (e.g. due to configuration update), the old quota will be overridden by the new one. Shared quotas referenced by ID will still adhere to expiration after `valid_until`.
       * 
* * string id = 3; * @param value The bytes for id to set. * @return This builder for chaining. */ public Builder setIdBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); id_ = 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.service.ratelimit.v3.RateLimitResponse.Quota) } // @@protoc_insertion_point(class_scope:envoy.service.ratelimit.v3.RateLimitResponse.Quota) private static final io.envoyproxy.envoy.service.ratelimit.v3.RateLimitResponse.Quota DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new io.envoyproxy.envoy.service.ratelimit.v3.RateLimitResponse.Quota(); } public static io.envoyproxy.envoy.service.ratelimit.v3.RateLimitResponse.Quota getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { @java.lang.Override public Quota parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return new Quota(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.service.ratelimit.v3.RateLimitResponse.Quota getDefaultInstanceForType() { return DEFAULT_INSTANCE; } } public interface DescriptorStatusOrBuilder extends // @@protoc_insertion_point(interface_extends:envoy.service.ratelimit.v3.RateLimitResponse.DescriptorStatus) com.google.protobuf.MessageOrBuilder { /** *
     * The response code for an individual descriptor.
     * 
* * .envoy.service.ratelimit.v3.RateLimitResponse.Code code = 1; * @return The enum numeric value on the wire for code. */ int getCodeValue(); /** *
     * The response code for an individual descriptor.
     * 
* * .envoy.service.ratelimit.v3.RateLimitResponse.Code code = 1; * @return The code. */ io.envoyproxy.envoy.service.ratelimit.v3.RateLimitResponse.Code getCode(); /** *
     * The current limit as configured by the server. Useful for debugging, etc.
     * 
* * .envoy.service.ratelimit.v3.RateLimitResponse.RateLimit current_limit = 2; * @return Whether the currentLimit field is set. */ boolean hasCurrentLimit(); /** *
     * The current limit as configured by the server. Useful for debugging, etc.
     * 
* * .envoy.service.ratelimit.v3.RateLimitResponse.RateLimit current_limit = 2; * @return The currentLimit. */ io.envoyproxy.envoy.service.ratelimit.v3.RateLimitResponse.RateLimit getCurrentLimit(); /** *
     * The current limit as configured by the server. Useful for debugging, etc.
     * 
* * .envoy.service.ratelimit.v3.RateLimitResponse.RateLimit current_limit = 2; */ io.envoyproxy.envoy.service.ratelimit.v3.RateLimitResponse.RateLimitOrBuilder getCurrentLimitOrBuilder(); /** *
     * The limit remaining in the current time unit.
     * 
* * uint32 limit_remaining = 3; * @return The limitRemaining. */ int getLimitRemaining(); /** *
     * Duration until reset of the current limit window.
     * 
* * .google.protobuf.Duration duration_until_reset = 4; * @return Whether the durationUntilReset field is set. */ boolean hasDurationUntilReset(); /** *
     * Duration until reset of the current limit window.
     * 
* * .google.protobuf.Duration duration_until_reset = 4; * @return The durationUntilReset. */ com.google.protobuf.Duration getDurationUntilReset(); /** *
     * Duration until reset of the current limit window.
     * 
* * .google.protobuf.Duration duration_until_reset = 4; */ com.google.protobuf.DurationOrBuilder getDurationUntilResetOrBuilder(); /** *
     * Quota is available for a request if its descriptor set has cached quota available for all
     * descriptors.
     * This is for each individual descriptor in the descriptor set. The client will perform matches for each individual descriptor against available per-descriptor quota.
     * If quota is available, a RLS request will not be made and the quota will be reduced by 1 for
     * all matching descriptors.
     * If there is not sufficient quota, there are three cases:
     * 1. A cached entry exists for a RLS descriptor that is out-of-quota, but not expired.
     *    In this case, the request will be treated as OVER_LIMIT.
     * 2. Some RLS descriptors have a cached entry that has valid quota but some RLS descriptors
     *    have no cached entry. This will trigger a new RLS request.
     *    When the result is returned, a single unit will be consumed from the quota for all
     *    matching descriptors.
     *    If the server did not provide a quota, such as the quota message is empty for some of
     *    the descriptors, then the request admission is determined by the
     *    :ref:`overall_code <envoy_v3_api_field_service.ratelimit.v3.RateLimitResponse.overall_code>`.
     * 3. All RLS descriptors lack a cached entry, this will trigger a new RLS request,
     *    When the result is returned, a single unit will be consumed from the quota for all
     *    matching descriptors.
     *    If the server did not provide a quota, such as the quota message is empty for some of
     *    the descriptors, then the request admission is determined by the
     *    :ref:`overall_code <envoy_v3_api_field_service.ratelimit.v3.RateLimitResponse.overall_code>`.
     * [#not-implemented-hide:]
     * 
* * .envoy.service.ratelimit.v3.RateLimitResponse.Quota quota = 5; * @return Whether the quota field is set. */ boolean hasQuota(); /** *
     * Quota is available for a request if its descriptor set has cached quota available for all
     * descriptors.
     * This is for each individual descriptor in the descriptor set. The client will perform matches for each individual descriptor against available per-descriptor quota.
     * If quota is available, a RLS request will not be made and the quota will be reduced by 1 for
     * all matching descriptors.
     * If there is not sufficient quota, there are three cases:
     * 1. A cached entry exists for a RLS descriptor that is out-of-quota, but not expired.
     *    In this case, the request will be treated as OVER_LIMIT.
     * 2. Some RLS descriptors have a cached entry that has valid quota but some RLS descriptors
     *    have no cached entry. This will trigger a new RLS request.
     *    When the result is returned, a single unit will be consumed from the quota for all
     *    matching descriptors.
     *    If the server did not provide a quota, such as the quota message is empty for some of
     *    the descriptors, then the request admission is determined by the
     *    :ref:`overall_code <envoy_v3_api_field_service.ratelimit.v3.RateLimitResponse.overall_code>`.
     * 3. All RLS descriptors lack a cached entry, this will trigger a new RLS request,
     *    When the result is returned, a single unit will be consumed from the quota for all
     *    matching descriptors.
     *    If the server did not provide a quota, such as the quota message is empty for some of
     *    the descriptors, then the request admission is determined by the
     *    :ref:`overall_code <envoy_v3_api_field_service.ratelimit.v3.RateLimitResponse.overall_code>`.
     * [#not-implemented-hide:]
     * 
* * .envoy.service.ratelimit.v3.RateLimitResponse.Quota quota = 5; * @return The quota. */ io.envoyproxy.envoy.service.ratelimit.v3.RateLimitResponse.Quota getQuota(); /** *
     * Quota is available for a request if its descriptor set has cached quota available for all
     * descriptors.
     * This is for each individual descriptor in the descriptor set. The client will perform matches for each individual descriptor against available per-descriptor quota.
     * If quota is available, a RLS request will not be made and the quota will be reduced by 1 for
     * all matching descriptors.
     * If there is not sufficient quota, there are three cases:
     * 1. A cached entry exists for a RLS descriptor that is out-of-quota, but not expired.
     *    In this case, the request will be treated as OVER_LIMIT.
     * 2. Some RLS descriptors have a cached entry that has valid quota but some RLS descriptors
     *    have no cached entry. This will trigger a new RLS request.
     *    When the result is returned, a single unit will be consumed from the quota for all
     *    matching descriptors.
     *    If the server did not provide a quota, such as the quota message is empty for some of
     *    the descriptors, then the request admission is determined by the
     *    :ref:`overall_code <envoy_v3_api_field_service.ratelimit.v3.RateLimitResponse.overall_code>`.
     * 3. All RLS descriptors lack a cached entry, this will trigger a new RLS request,
     *    When the result is returned, a single unit will be consumed from the quota for all
     *    matching descriptors.
     *    If the server did not provide a quota, such as the quota message is empty for some of
     *    the descriptors, then the request admission is determined by the
     *    :ref:`overall_code <envoy_v3_api_field_service.ratelimit.v3.RateLimitResponse.overall_code>`.
     * [#not-implemented-hide:]
     * 
* * .envoy.service.ratelimit.v3.RateLimitResponse.Quota quota = 5; */ io.envoyproxy.envoy.service.ratelimit.v3.RateLimitResponse.QuotaOrBuilder getQuotaOrBuilder(); } /** *
   * [#next-free-field: 6]
   * 
* * Protobuf type {@code envoy.service.ratelimit.v3.RateLimitResponse.DescriptorStatus} */ public static final class DescriptorStatus extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:envoy.service.ratelimit.v3.RateLimitResponse.DescriptorStatus) DescriptorStatusOrBuilder { private static final long serialVersionUID = 0L; // Use DescriptorStatus.newBuilder() to construct. private DescriptorStatus(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } private DescriptorStatus() { code_ = 0; } @java.lang.Override @SuppressWarnings({"unused"}) protected java.lang.Object newInstance( UnusedPrivateParameter unused) { return new DescriptorStatus(); } @java.lang.Override public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } private DescriptorStatus( 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: { int rawValue = input.readEnum(); code_ = rawValue; break; } case 18: { io.envoyproxy.envoy.service.ratelimit.v3.RateLimitResponse.RateLimit.Builder subBuilder = null; if (currentLimit_ != null) { subBuilder = currentLimit_.toBuilder(); } currentLimit_ = input.readMessage(io.envoyproxy.envoy.service.ratelimit.v3.RateLimitResponse.RateLimit.parser(), extensionRegistry); if (subBuilder != null) { subBuilder.mergeFrom(currentLimit_); currentLimit_ = subBuilder.buildPartial(); } break; } case 24: { limitRemaining_ = input.readUInt32(); break; } case 34: { com.google.protobuf.Duration.Builder subBuilder = null; if (durationUntilReset_ != null) { subBuilder = durationUntilReset_.toBuilder(); } durationUntilReset_ = input.readMessage(com.google.protobuf.Duration.parser(), extensionRegistry); if (subBuilder != null) { subBuilder.mergeFrom(durationUntilReset_); durationUntilReset_ = subBuilder.buildPartial(); } break; } case 42: { io.envoyproxy.envoy.service.ratelimit.v3.RateLimitResponse.Quota.Builder subBuilder = null; if (quota_ != null) { subBuilder = quota_.toBuilder(); } quota_ = input.readMessage(io.envoyproxy.envoy.service.ratelimit.v3.RateLimitResponse.Quota.parser(), extensionRegistry); if (subBuilder != null) { subBuilder.mergeFrom(quota_); quota_ = 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 { this.unknownFields = unknownFields.build(); makeExtensionsImmutable(); } } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return io.envoyproxy.envoy.service.ratelimit.v3.RlsProto.internal_static_envoy_service_ratelimit_v3_RateLimitResponse_DescriptorStatus_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return io.envoyproxy.envoy.service.ratelimit.v3.RlsProto.internal_static_envoy_service_ratelimit_v3_RateLimitResponse_DescriptorStatus_fieldAccessorTable .ensureFieldAccessorsInitialized( io.envoyproxy.envoy.service.ratelimit.v3.RateLimitResponse.DescriptorStatus.class, io.envoyproxy.envoy.service.ratelimit.v3.RateLimitResponse.DescriptorStatus.Builder.class); } public static final int CODE_FIELD_NUMBER = 1; private int code_; /** *
     * The response code for an individual descriptor.
     * 
* * .envoy.service.ratelimit.v3.RateLimitResponse.Code code = 1; * @return The enum numeric value on the wire for code. */ @java.lang.Override public int getCodeValue() { return code_; } /** *
     * The response code for an individual descriptor.
     * 
* * .envoy.service.ratelimit.v3.RateLimitResponse.Code code = 1; * @return The code. */ @java.lang.Override public io.envoyproxy.envoy.service.ratelimit.v3.RateLimitResponse.Code getCode() { @SuppressWarnings("deprecation") io.envoyproxy.envoy.service.ratelimit.v3.RateLimitResponse.Code result = io.envoyproxy.envoy.service.ratelimit.v3.RateLimitResponse.Code.valueOf(code_); return result == null ? io.envoyproxy.envoy.service.ratelimit.v3.RateLimitResponse.Code.UNRECOGNIZED : result; } public static final int CURRENT_LIMIT_FIELD_NUMBER = 2; private io.envoyproxy.envoy.service.ratelimit.v3.RateLimitResponse.RateLimit currentLimit_; /** *
     * The current limit as configured by the server. Useful for debugging, etc.
     * 
* * .envoy.service.ratelimit.v3.RateLimitResponse.RateLimit current_limit = 2; * @return Whether the currentLimit field is set. */ @java.lang.Override public boolean hasCurrentLimit() { return currentLimit_ != null; } /** *
     * The current limit as configured by the server. Useful for debugging, etc.
     * 
* * .envoy.service.ratelimit.v3.RateLimitResponse.RateLimit current_limit = 2; * @return The currentLimit. */ @java.lang.Override public io.envoyproxy.envoy.service.ratelimit.v3.RateLimitResponse.RateLimit getCurrentLimit() { return currentLimit_ == null ? io.envoyproxy.envoy.service.ratelimit.v3.RateLimitResponse.RateLimit.getDefaultInstance() : currentLimit_; } /** *
     * The current limit as configured by the server. Useful for debugging, etc.
     * 
* * .envoy.service.ratelimit.v3.RateLimitResponse.RateLimit current_limit = 2; */ @java.lang.Override public io.envoyproxy.envoy.service.ratelimit.v3.RateLimitResponse.RateLimitOrBuilder getCurrentLimitOrBuilder() { return getCurrentLimit(); } public static final int LIMIT_REMAINING_FIELD_NUMBER = 3; private int limitRemaining_; /** *
     * The limit remaining in the current time unit.
     * 
* * uint32 limit_remaining = 3; * @return The limitRemaining. */ @java.lang.Override public int getLimitRemaining() { return limitRemaining_; } public static final int DURATION_UNTIL_RESET_FIELD_NUMBER = 4; private com.google.protobuf.Duration durationUntilReset_; /** *
     * Duration until reset of the current limit window.
     * 
* * .google.protobuf.Duration duration_until_reset = 4; * @return Whether the durationUntilReset field is set. */ @java.lang.Override public boolean hasDurationUntilReset() { return durationUntilReset_ != null; } /** *
     * Duration until reset of the current limit window.
     * 
* * .google.protobuf.Duration duration_until_reset = 4; * @return The durationUntilReset. */ @java.lang.Override public com.google.protobuf.Duration getDurationUntilReset() { return durationUntilReset_ == null ? com.google.protobuf.Duration.getDefaultInstance() : durationUntilReset_; } /** *
     * Duration until reset of the current limit window.
     * 
* * .google.protobuf.Duration duration_until_reset = 4; */ @java.lang.Override public com.google.protobuf.DurationOrBuilder getDurationUntilResetOrBuilder() { return getDurationUntilReset(); } public static final int QUOTA_FIELD_NUMBER = 5; private io.envoyproxy.envoy.service.ratelimit.v3.RateLimitResponse.Quota quota_; /** *
     * Quota is available for a request if its descriptor set has cached quota available for all
     * descriptors.
     * This is for each individual descriptor in the descriptor set. The client will perform matches for each individual descriptor against available per-descriptor quota.
     * If quota is available, a RLS request will not be made and the quota will be reduced by 1 for
     * all matching descriptors.
     * If there is not sufficient quota, there are three cases:
     * 1. A cached entry exists for a RLS descriptor that is out-of-quota, but not expired.
     *    In this case, the request will be treated as OVER_LIMIT.
     * 2. Some RLS descriptors have a cached entry that has valid quota but some RLS descriptors
     *    have no cached entry. This will trigger a new RLS request.
     *    When the result is returned, a single unit will be consumed from the quota for all
     *    matching descriptors.
     *    If the server did not provide a quota, such as the quota message is empty for some of
     *    the descriptors, then the request admission is determined by the
     *    :ref:`overall_code <envoy_v3_api_field_service.ratelimit.v3.RateLimitResponse.overall_code>`.
     * 3. All RLS descriptors lack a cached entry, this will trigger a new RLS request,
     *    When the result is returned, a single unit will be consumed from the quota for all
     *    matching descriptors.
     *    If the server did not provide a quota, such as the quota message is empty for some of
     *    the descriptors, then the request admission is determined by the
     *    :ref:`overall_code <envoy_v3_api_field_service.ratelimit.v3.RateLimitResponse.overall_code>`.
     * [#not-implemented-hide:]
     * 
* * .envoy.service.ratelimit.v3.RateLimitResponse.Quota quota = 5; * @return Whether the quota field is set. */ @java.lang.Override public boolean hasQuota() { return quota_ != null; } /** *
     * Quota is available for a request if its descriptor set has cached quota available for all
     * descriptors.
     * This is for each individual descriptor in the descriptor set. The client will perform matches for each individual descriptor against available per-descriptor quota.
     * If quota is available, a RLS request will not be made and the quota will be reduced by 1 for
     * all matching descriptors.
     * If there is not sufficient quota, there are three cases:
     * 1. A cached entry exists for a RLS descriptor that is out-of-quota, but not expired.
     *    In this case, the request will be treated as OVER_LIMIT.
     * 2. Some RLS descriptors have a cached entry that has valid quota but some RLS descriptors
     *    have no cached entry. This will trigger a new RLS request.
     *    When the result is returned, a single unit will be consumed from the quota for all
     *    matching descriptors.
     *    If the server did not provide a quota, such as the quota message is empty for some of
     *    the descriptors, then the request admission is determined by the
     *    :ref:`overall_code <envoy_v3_api_field_service.ratelimit.v3.RateLimitResponse.overall_code>`.
     * 3. All RLS descriptors lack a cached entry, this will trigger a new RLS request,
     *    When the result is returned, a single unit will be consumed from the quota for all
     *    matching descriptors.
     *    If the server did not provide a quota, such as the quota message is empty for some of
     *    the descriptors, then the request admission is determined by the
     *    :ref:`overall_code <envoy_v3_api_field_service.ratelimit.v3.RateLimitResponse.overall_code>`.
     * [#not-implemented-hide:]
     * 
* * .envoy.service.ratelimit.v3.RateLimitResponse.Quota quota = 5; * @return The quota. */ @java.lang.Override public io.envoyproxy.envoy.service.ratelimit.v3.RateLimitResponse.Quota getQuota() { return quota_ == null ? io.envoyproxy.envoy.service.ratelimit.v3.RateLimitResponse.Quota.getDefaultInstance() : quota_; } /** *
     * Quota is available for a request if its descriptor set has cached quota available for all
     * descriptors.
     * This is for each individual descriptor in the descriptor set. The client will perform matches for each individual descriptor against available per-descriptor quota.
     * If quota is available, a RLS request will not be made and the quota will be reduced by 1 for
     * all matching descriptors.
     * If there is not sufficient quota, there are three cases:
     * 1. A cached entry exists for a RLS descriptor that is out-of-quota, but not expired.
     *    In this case, the request will be treated as OVER_LIMIT.
     * 2. Some RLS descriptors have a cached entry that has valid quota but some RLS descriptors
     *    have no cached entry. This will trigger a new RLS request.
     *    When the result is returned, a single unit will be consumed from the quota for all
     *    matching descriptors.
     *    If the server did not provide a quota, such as the quota message is empty for some of
     *    the descriptors, then the request admission is determined by the
     *    :ref:`overall_code <envoy_v3_api_field_service.ratelimit.v3.RateLimitResponse.overall_code>`.
     * 3. All RLS descriptors lack a cached entry, this will trigger a new RLS request,
     *    When the result is returned, a single unit will be consumed from the quota for all
     *    matching descriptors.
     *    If the server did not provide a quota, such as the quota message is empty for some of
     *    the descriptors, then the request admission is determined by the
     *    :ref:`overall_code <envoy_v3_api_field_service.ratelimit.v3.RateLimitResponse.overall_code>`.
     * [#not-implemented-hide:]
     * 
* * .envoy.service.ratelimit.v3.RateLimitResponse.Quota quota = 5; */ @java.lang.Override public io.envoyproxy.envoy.service.ratelimit.v3.RateLimitResponse.QuotaOrBuilder getQuotaOrBuilder() { return getQuota(); } 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 (code_ != io.envoyproxy.envoy.service.ratelimit.v3.RateLimitResponse.Code.UNKNOWN.getNumber()) { output.writeEnum(1, code_); } if (currentLimit_ != null) { output.writeMessage(2, getCurrentLimit()); } if (limitRemaining_ != 0) { output.writeUInt32(3, limitRemaining_); } if (durationUntilReset_ != null) { output.writeMessage(4, getDurationUntilReset()); } if (quota_ != null) { output.writeMessage(5, getQuota()); } unknownFields.writeTo(output); } @java.lang.Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; if (code_ != io.envoyproxy.envoy.service.ratelimit.v3.RateLimitResponse.Code.UNKNOWN.getNumber()) { size += com.google.protobuf.CodedOutputStream .computeEnumSize(1, code_); } if (currentLimit_ != null) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(2, getCurrentLimit()); } if (limitRemaining_ != 0) { size += com.google.protobuf.CodedOutputStream .computeUInt32Size(3, limitRemaining_); } if (durationUntilReset_ != null) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(4, getDurationUntilReset()); } if (quota_ != null) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(5, getQuota()); } 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.service.ratelimit.v3.RateLimitResponse.DescriptorStatus)) { return super.equals(obj); } io.envoyproxy.envoy.service.ratelimit.v3.RateLimitResponse.DescriptorStatus other = (io.envoyproxy.envoy.service.ratelimit.v3.RateLimitResponse.DescriptorStatus) obj; if (code_ != other.code_) return false; if (hasCurrentLimit() != other.hasCurrentLimit()) return false; if (hasCurrentLimit()) { if (!getCurrentLimit() .equals(other.getCurrentLimit())) return false; } if (getLimitRemaining() != other.getLimitRemaining()) return false; if (hasDurationUntilReset() != other.hasDurationUntilReset()) return false; if (hasDurationUntilReset()) { if (!getDurationUntilReset() .equals(other.getDurationUntilReset())) return false; } if (hasQuota() != other.hasQuota()) return false; if (hasQuota()) { if (!getQuota() .equals(other.getQuota())) 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) + CODE_FIELD_NUMBER; hash = (53 * hash) + code_; if (hasCurrentLimit()) { hash = (37 * hash) + CURRENT_LIMIT_FIELD_NUMBER; hash = (53 * hash) + getCurrentLimit().hashCode(); } hash = (37 * hash) + LIMIT_REMAINING_FIELD_NUMBER; hash = (53 * hash) + getLimitRemaining(); if (hasDurationUntilReset()) { hash = (37 * hash) + DURATION_UNTIL_RESET_FIELD_NUMBER; hash = (53 * hash) + getDurationUntilReset().hashCode(); } if (hasQuota()) { hash = (37 * hash) + QUOTA_FIELD_NUMBER; hash = (53 * hash) + getQuota().hashCode(); } hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; } public static io.envoyproxy.envoy.service.ratelimit.v3.RateLimitResponse.DescriptorStatus parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static io.envoyproxy.envoy.service.ratelimit.v3.RateLimitResponse.DescriptorStatus 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.service.ratelimit.v3.RateLimitResponse.DescriptorStatus parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static io.envoyproxy.envoy.service.ratelimit.v3.RateLimitResponse.DescriptorStatus 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.service.ratelimit.v3.RateLimitResponse.DescriptorStatus parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static io.envoyproxy.envoy.service.ratelimit.v3.RateLimitResponse.DescriptorStatus parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static io.envoyproxy.envoy.service.ratelimit.v3.RateLimitResponse.DescriptorStatus parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static io.envoyproxy.envoy.service.ratelimit.v3.RateLimitResponse.DescriptorStatus 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.service.ratelimit.v3.RateLimitResponse.DescriptorStatus parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } public static io.envoyproxy.envoy.service.ratelimit.v3.RateLimitResponse.DescriptorStatus 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.service.ratelimit.v3.RateLimitResponse.DescriptorStatus parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static io.envoyproxy.envoy.service.ratelimit.v3.RateLimitResponse.DescriptorStatus 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.service.ratelimit.v3.RateLimitResponse.DescriptorStatus 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; } /** *
     * [#next-free-field: 6]
     * 
* * Protobuf type {@code envoy.service.ratelimit.v3.RateLimitResponse.DescriptorStatus} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:envoy.service.ratelimit.v3.RateLimitResponse.DescriptorStatus) io.envoyproxy.envoy.service.ratelimit.v3.RateLimitResponse.DescriptorStatusOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return io.envoyproxy.envoy.service.ratelimit.v3.RlsProto.internal_static_envoy_service_ratelimit_v3_RateLimitResponse_DescriptorStatus_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return io.envoyproxy.envoy.service.ratelimit.v3.RlsProto.internal_static_envoy_service_ratelimit_v3_RateLimitResponse_DescriptorStatus_fieldAccessorTable .ensureFieldAccessorsInitialized( io.envoyproxy.envoy.service.ratelimit.v3.RateLimitResponse.DescriptorStatus.class, io.envoyproxy.envoy.service.ratelimit.v3.RateLimitResponse.DescriptorStatus.Builder.class); } // Construct using io.envoyproxy.envoy.service.ratelimit.v3.RateLimitResponse.DescriptorStatus.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(); code_ = 0; if (currentLimitBuilder_ == null) { currentLimit_ = null; } else { currentLimit_ = null; currentLimitBuilder_ = null; } limitRemaining_ = 0; if (durationUntilResetBuilder_ == null) { durationUntilReset_ = null; } else { durationUntilReset_ = null; durationUntilResetBuilder_ = null; } if (quotaBuilder_ == null) { quota_ = null; } else { quota_ = null; quotaBuilder_ = null; } return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return io.envoyproxy.envoy.service.ratelimit.v3.RlsProto.internal_static_envoy_service_ratelimit_v3_RateLimitResponse_DescriptorStatus_descriptor; } @java.lang.Override public io.envoyproxy.envoy.service.ratelimit.v3.RateLimitResponse.DescriptorStatus getDefaultInstanceForType() { return io.envoyproxy.envoy.service.ratelimit.v3.RateLimitResponse.DescriptorStatus.getDefaultInstance(); } @java.lang.Override public io.envoyproxy.envoy.service.ratelimit.v3.RateLimitResponse.DescriptorStatus build() { io.envoyproxy.envoy.service.ratelimit.v3.RateLimitResponse.DescriptorStatus result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } @java.lang.Override public io.envoyproxy.envoy.service.ratelimit.v3.RateLimitResponse.DescriptorStatus buildPartial() { io.envoyproxy.envoy.service.ratelimit.v3.RateLimitResponse.DescriptorStatus result = new io.envoyproxy.envoy.service.ratelimit.v3.RateLimitResponse.DescriptorStatus(this); result.code_ = code_; if (currentLimitBuilder_ == null) { result.currentLimit_ = currentLimit_; } else { result.currentLimit_ = currentLimitBuilder_.build(); } result.limitRemaining_ = limitRemaining_; if (durationUntilResetBuilder_ == null) { result.durationUntilReset_ = durationUntilReset_; } else { result.durationUntilReset_ = durationUntilResetBuilder_.build(); } if (quotaBuilder_ == null) { result.quota_ = quota_; } else { result.quota_ = quotaBuilder_.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.service.ratelimit.v3.RateLimitResponse.DescriptorStatus) { return mergeFrom((io.envoyproxy.envoy.service.ratelimit.v3.RateLimitResponse.DescriptorStatus)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(io.envoyproxy.envoy.service.ratelimit.v3.RateLimitResponse.DescriptorStatus other) { if (other == io.envoyproxy.envoy.service.ratelimit.v3.RateLimitResponse.DescriptorStatus.getDefaultInstance()) return this; if (other.code_ != 0) { setCodeValue(other.getCodeValue()); } if (other.hasCurrentLimit()) { mergeCurrentLimit(other.getCurrentLimit()); } if (other.getLimitRemaining() != 0) { setLimitRemaining(other.getLimitRemaining()); } if (other.hasDurationUntilReset()) { mergeDurationUntilReset(other.getDurationUntilReset()); } if (other.hasQuota()) { mergeQuota(other.getQuota()); } 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.service.ratelimit.v3.RateLimitResponse.DescriptorStatus parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = (io.envoyproxy.envoy.service.ratelimit.v3.RateLimitResponse.DescriptorStatus) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { if (parsedMessage != null) { mergeFrom(parsedMessage); } } return this; } private int code_ = 0; /** *
       * The response code for an individual descriptor.
       * 
* * .envoy.service.ratelimit.v3.RateLimitResponse.Code code = 1; * @return The enum numeric value on the wire for code. */ @java.lang.Override public int getCodeValue() { return code_; } /** *
       * The response code for an individual descriptor.
       * 
* * .envoy.service.ratelimit.v3.RateLimitResponse.Code code = 1; * @param value The enum numeric value on the wire for code to set. * @return This builder for chaining. */ public Builder setCodeValue(int value) { code_ = value; onChanged(); return this; } /** *
       * The response code for an individual descriptor.
       * 
* * .envoy.service.ratelimit.v3.RateLimitResponse.Code code = 1; * @return The code. */ @java.lang.Override public io.envoyproxy.envoy.service.ratelimit.v3.RateLimitResponse.Code getCode() { @SuppressWarnings("deprecation") io.envoyproxy.envoy.service.ratelimit.v3.RateLimitResponse.Code result = io.envoyproxy.envoy.service.ratelimit.v3.RateLimitResponse.Code.valueOf(code_); return result == null ? io.envoyproxy.envoy.service.ratelimit.v3.RateLimitResponse.Code.UNRECOGNIZED : result; } /** *
       * The response code for an individual descriptor.
       * 
* * .envoy.service.ratelimit.v3.RateLimitResponse.Code code = 1; * @param value The code to set. * @return This builder for chaining. */ public Builder setCode(io.envoyproxy.envoy.service.ratelimit.v3.RateLimitResponse.Code value) { if (value == null) { throw new NullPointerException(); } code_ = value.getNumber(); onChanged(); return this; } /** *
       * The response code for an individual descriptor.
       * 
* * .envoy.service.ratelimit.v3.RateLimitResponse.Code code = 1; * @return This builder for chaining. */ public Builder clearCode() { code_ = 0; onChanged(); return this; } private io.envoyproxy.envoy.service.ratelimit.v3.RateLimitResponse.RateLimit currentLimit_; private com.google.protobuf.SingleFieldBuilderV3< io.envoyproxy.envoy.service.ratelimit.v3.RateLimitResponse.RateLimit, io.envoyproxy.envoy.service.ratelimit.v3.RateLimitResponse.RateLimit.Builder, io.envoyproxy.envoy.service.ratelimit.v3.RateLimitResponse.RateLimitOrBuilder> currentLimitBuilder_; /** *
       * The current limit as configured by the server. Useful for debugging, etc.
       * 
* * .envoy.service.ratelimit.v3.RateLimitResponse.RateLimit current_limit = 2; * @return Whether the currentLimit field is set. */ public boolean hasCurrentLimit() { return currentLimitBuilder_ != null || currentLimit_ != null; } /** *
       * The current limit as configured by the server. Useful for debugging, etc.
       * 
* * .envoy.service.ratelimit.v3.RateLimitResponse.RateLimit current_limit = 2; * @return The currentLimit. */ public io.envoyproxy.envoy.service.ratelimit.v3.RateLimitResponse.RateLimit getCurrentLimit() { if (currentLimitBuilder_ == null) { return currentLimit_ == null ? io.envoyproxy.envoy.service.ratelimit.v3.RateLimitResponse.RateLimit.getDefaultInstance() : currentLimit_; } else { return currentLimitBuilder_.getMessage(); } } /** *
       * The current limit as configured by the server. Useful for debugging, etc.
       * 
* * .envoy.service.ratelimit.v3.RateLimitResponse.RateLimit current_limit = 2; */ public Builder setCurrentLimit(io.envoyproxy.envoy.service.ratelimit.v3.RateLimitResponse.RateLimit value) { if (currentLimitBuilder_ == null) { if (value == null) { throw new NullPointerException(); } currentLimit_ = value; onChanged(); } else { currentLimitBuilder_.setMessage(value); } return this; } /** *
       * The current limit as configured by the server. Useful for debugging, etc.
       * 
* * .envoy.service.ratelimit.v3.RateLimitResponse.RateLimit current_limit = 2; */ public Builder setCurrentLimit( io.envoyproxy.envoy.service.ratelimit.v3.RateLimitResponse.RateLimit.Builder builderForValue) { if (currentLimitBuilder_ == null) { currentLimit_ = builderForValue.build(); onChanged(); } else { currentLimitBuilder_.setMessage(builderForValue.build()); } return this; } /** *
       * The current limit as configured by the server. Useful for debugging, etc.
       * 
* * .envoy.service.ratelimit.v3.RateLimitResponse.RateLimit current_limit = 2; */ public Builder mergeCurrentLimit(io.envoyproxy.envoy.service.ratelimit.v3.RateLimitResponse.RateLimit value) { if (currentLimitBuilder_ == null) { if (currentLimit_ != null) { currentLimit_ = io.envoyproxy.envoy.service.ratelimit.v3.RateLimitResponse.RateLimit.newBuilder(currentLimit_).mergeFrom(value).buildPartial(); } else { currentLimit_ = value; } onChanged(); } else { currentLimitBuilder_.mergeFrom(value); } return this; } /** *
       * The current limit as configured by the server. Useful for debugging, etc.
       * 
* * .envoy.service.ratelimit.v3.RateLimitResponse.RateLimit current_limit = 2; */ public Builder clearCurrentLimit() { if (currentLimitBuilder_ == null) { currentLimit_ = null; onChanged(); } else { currentLimit_ = null; currentLimitBuilder_ = null; } return this; } /** *
       * The current limit as configured by the server. Useful for debugging, etc.
       * 
* * .envoy.service.ratelimit.v3.RateLimitResponse.RateLimit current_limit = 2; */ public io.envoyproxy.envoy.service.ratelimit.v3.RateLimitResponse.RateLimit.Builder getCurrentLimitBuilder() { onChanged(); return getCurrentLimitFieldBuilder().getBuilder(); } /** *
       * The current limit as configured by the server. Useful for debugging, etc.
       * 
* * .envoy.service.ratelimit.v3.RateLimitResponse.RateLimit current_limit = 2; */ public io.envoyproxy.envoy.service.ratelimit.v3.RateLimitResponse.RateLimitOrBuilder getCurrentLimitOrBuilder() { if (currentLimitBuilder_ != null) { return currentLimitBuilder_.getMessageOrBuilder(); } else { return currentLimit_ == null ? io.envoyproxy.envoy.service.ratelimit.v3.RateLimitResponse.RateLimit.getDefaultInstance() : currentLimit_; } } /** *
       * The current limit as configured by the server. Useful for debugging, etc.
       * 
* * .envoy.service.ratelimit.v3.RateLimitResponse.RateLimit current_limit = 2; */ private com.google.protobuf.SingleFieldBuilderV3< io.envoyproxy.envoy.service.ratelimit.v3.RateLimitResponse.RateLimit, io.envoyproxy.envoy.service.ratelimit.v3.RateLimitResponse.RateLimit.Builder, io.envoyproxy.envoy.service.ratelimit.v3.RateLimitResponse.RateLimitOrBuilder> getCurrentLimitFieldBuilder() { if (currentLimitBuilder_ == null) { currentLimitBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< io.envoyproxy.envoy.service.ratelimit.v3.RateLimitResponse.RateLimit, io.envoyproxy.envoy.service.ratelimit.v3.RateLimitResponse.RateLimit.Builder, io.envoyproxy.envoy.service.ratelimit.v3.RateLimitResponse.RateLimitOrBuilder>( getCurrentLimit(), getParentForChildren(), isClean()); currentLimit_ = null; } return currentLimitBuilder_; } private int limitRemaining_ ; /** *
       * The limit remaining in the current time unit.
       * 
* * uint32 limit_remaining = 3; * @return The limitRemaining. */ @java.lang.Override public int getLimitRemaining() { return limitRemaining_; } /** *
       * The limit remaining in the current time unit.
       * 
* * uint32 limit_remaining = 3; * @param value The limitRemaining to set. * @return This builder for chaining. */ public Builder setLimitRemaining(int value) { limitRemaining_ = value; onChanged(); return this; } /** *
       * The limit remaining in the current time unit.
       * 
* * uint32 limit_remaining = 3; * @return This builder for chaining. */ public Builder clearLimitRemaining() { limitRemaining_ = 0; onChanged(); return this; } private com.google.protobuf.Duration durationUntilReset_; private com.google.protobuf.SingleFieldBuilderV3< com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder> durationUntilResetBuilder_; /** *
       * Duration until reset of the current limit window.
       * 
* * .google.protobuf.Duration duration_until_reset = 4; * @return Whether the durationUntilReset field is set. */ public boolean hasDurationUntilReset() { return durationUntilResetBuilder_ != null || durationUntilReset_ != null; } /** *
       * Duration until reset of the current limit window.
       * 
* * .google.protobuf.Duration duration_until_reset = 4; * @return The durationUntilReset. */ public com.google.protobuf.Duration getDurationUntilReset() { if (durationUntilResetBuilder_ == null) { return durationUntilReset_ == null ? com.google.protobuf.Duration.getDefaultInstance() : durationUntilReset_; } else { return durationUntilResetBuilder_.getMessage(); } } /** *
       * Duration until reset of the current limit window.
       * 
* * .google.protobuf.Duration duration_until_reset = 4; */ public Builder setDurationUntilReset(com.google.protobuf.Duration value) { if (durationUntilResetBuilder_ == null) { if (value == null) { throw new NullPointerException(); } durationUntilReset_ = value; onChanged(); } else { durationUntilResetBuilder_.setMessage(value); } return this; } /** *
       * Duration until reset of the current limit window.
       * 
* * .google.protobuf.Duration duration_until_reset = 4; */ public Builder setDurationUntilReset( com.google.protobuf.Duration.Builder builderForValue) { if (durationUntilResetBuilder_ == null) { durationUntilReset_ = builderForValue.build(); onChanged(); } else { durationUntilResetBuilder_.setMessage(builderForValue.build()); } return this; } /** *
       * Duration until reset of the current limit window.
       * 
* * .google.protobuf.Duration duration_until_reset = 4; */ public Builder mergeDurationUntilReset(com.google.protobuf.Duration value) { if (durationUntilResetBuilder_ == null) { if (durationUntilReset_ != null) { durationUntilReset_ = com.google.protobuf.Duration.newBuilder(durationUntilReset_).mergeFrom(value).buildPartial(); } else { durationUntilReset_ = value; } onChanged(); } else { durationUntilResetBuilder_.mergeFrom(value); } return this; } /** *
       * Duration until reset of the current limit window.
       * 
* * .google.protobuf.Duration duration_until_reset = 4; */ public Builder clearDurationUntilReset() { if (durationUntilResetBuilder_ == null) { durationUntilReset_ = null; onChanged(); } else { durationUntilReset_ = null; durationUntilResetBuilder_ = null; } return this; } /** *
       * Duration until reset of the current limit window.
       * 
* * .google.protobuf.Duration duration_until_reset = 4; */ public com.google.protobuf.Duration.Builder getDurationUntilResetBuilder() { onChanged(); return getDurationUntilResetFieldBuilder().getBuilder(); } /** *
       * Duration until reset of the current limit window.
       * 
* * .google.protobuf.Duration duration_until_reset = 4; */ public com.google.protobuf.DurationOrBuilder getDurationUntilResetOrBuilder() { if (durationUntilResetBuilder_ != null) { return durationUntilResetBuilder_.getMessageOrBuilder(); } else { return durationUntilReset_ == null ? com.google.protobuf.Duration.getDefaultInstance() : durationUntilReset_; } } /** *
       * Duration until reset of the current limit window.
       * 
* * .google.protobuf.Duration duration_until_reset = 4; */ private com.google.protobuf.SingleFieldBuilderV3< com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder> getDurationUntilResetFieldBuilder() { if (durationUntilResetBuilder_ == null) { durationUntilResetBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder>( getDurationUntilReset(), getParentForChildren(), isClean()); durationUntilReset_ = null; } return durationUntilResetBuilder_; } private io.envoyproxy.envoy.service.ratelimit.v3.RateLimitResponse.Quota quota_; private com.google.protobuf.SingleFieldBuilderV3< io.envoyproxy.envoy.service.ratelimit.v3.RateLimitResponse.Quota, io.envoyproxy.envoy.service.ratelimit.v3.RateLimitResponse.Quota.Builder, io.envoyproxy.envoy.service.ratelimit.v3.RateLimitResponse.QuotaOrBuilder> quotaBuilder_; /** *
       * Quota is available for a request if its descriptor set has cached quota available for all
       * descriptors.
       * This is for each individual descriptor in the descriptor set. The client will perform matches for each individual descriptor against available per-descriptor quota.
       * If quota is available, a RLS request will not be made and the quota will be reduced by 1 for
       * all matching descriptors.
       * If there is not sufficient quota, there are three cases:
       * 1. A cached entry exists for a RLS descriptor that is out-of-quota, but not expired.
       *    In this case, the request will be treated as OVER_LIMIT.
       * 2. Some RLS descriptors have a cached entry that has valid quota but some RLS descriptors
       *    have no cached entry. This will trigger a new RLS request.
       *    When the result is returned, a single unit will be consumed from the quota for all
       *    matching descriptors.
       *    If the server did not provide a quota, such as the quota message is empty for some of
       *    the descriptors, then the request admission is determined by the
       *    :ref:`overall_code <envoy_v3_api_field_service.ratelimit.v3.RateLimitResponse.overall_code>`.
       * 3. All RLS descriptors lack a cached entry, this will trigger a new RLS request,
       *    When the result is returned, a single unit will be consumed from the quota for all
       *    matching descriptors.
       *    If the server did not provide a quota, such as the quota message is empty for some of
       *    the descriptors, then the request admission is determined by the
       *    :ref:`overall_code <envoy_v3_api_field_service.ratelimit.v3.RateLimitResponse.overall_code>`.
       * [#not-implemented-hide:]
       * 
* * .envoy.service.ratelimit.v3.RateLimitResponse.Quota quota = 5; * @return Whether the quota field is set. */ public boolean hasQuota() { return quotaBuilder_ != null || quota_ != null; } /** *
       * Quota is available for a request if its descriptor set has cached quota available for all
       * descriptors.
       * This is for each individual descriptor in the descriptor set. The client will perform matches for each individual descriptor against available per-descriptor quota.
       * If quota is available, a RLS request will not be made and the quota will be reduced by 1 for
       * all matching descriptors.
       * If there is not sufficient quota, there are three cases:
       * 1. A cached entry exists for a RLS descriptor that is out-of-quota, but not expired.
       *    In this case, the request will be treated as OVER_LIMIT.
       * 2. Some RLS descriptors have a cached entry that has valid quota but some RLS descriptors
       *    have no cached entry. This will trigger a new RLS request.
       *    When the result is returned, a single unit will be consumed from the quota for all
       *    matching descriptors.
       *    If the server did not provide a quota, such as the quota message is empty for some of
       *    the descriptors, then the request admission is determined by the
       *    :ref:`overall_code <envoy_v3_api_field_service.ratelimit.v3.RateLimitResponse.overall_code>`.
       * 3. All RLS descriptors lack a cached entry, this will trigger a new RLS request,
       *    When the result is returned, a single unit will be consumed from the quota for all
       *    matching descriptors.
       *    If the server did not provide a quota, such as the quota message is empty for some of
       *    the descriptors, then the request admission is determined by the
       *    :ref:`overall_code <envoy_v3_api_field_service.ratelimit.v3.RateLimitResponse.overall_code>`.
       * [#not-implemented-hide:]
       * 
* * .envoy.service.ratelimit.v3.RateLimitResponse.Quota quota = 5; * @return The quota. */ public io.envoyproxy.envoy.service.ratelimit.v3.RateLimitResponse.Quota getQuota() { if (quotaBuilder_ == null) { return quota_ == null ? io.envoyproxy.envoy.service.ratelimit.v3.RateLimitResponse.Quota.getDefaultInstance() : quota_; } else { return quotaBuilder_.getMessage(); } } /** *
       * Quota is available for a request if its descriptor set has cached quota available for all
       * descriptors.
       * This is for each individual descriptor in the descriptor set. The client will perform matches for each individual descriptor against available per-descriptor quota.
       * If quota is available, a RLS request will not be made and the quota will be reduced by 1 for
       * all matching descriptors.
       * If there is not sufficient quota, there are three cases:
       * 1. A cached entry exists for a RLS descriptor that is out-of-quota, but not expired.
       *    In this case, the request will be treated as OVER_LIMIT.
       * 2. Some RLS descriptors have a cached entry that has valid quota but some RLS descriptors
       *    have no cached entry. This will trigger a new RLS request.
       *    When the result is returned, a single unit will be consumed from the quota for all
       *    matching descriptors.
       *    If the server did not provide a quota, such as the quota message is empty for some of
       *    the descriptors, then the request admission is determined by the
       *    :ref:`overall_code <envoy_v3_api_field_service.ratelimit.v3.RateLimitResponse.overall_code>`.
       * 3. All RLS descriptors lack a cached entry, this will trigger a new RLS request,
       *    When the result is returned, a single unit will be consumed from the quota for all
       *    matching descriptors.
       *    If the server did not provide a quota, such as the quota message is empty for some of
       *    the descriptors, then the request admission is determined by the
       *    :ref:`overall_code <envoy_v3_api_field_service.ratelimit.v3.RateLimitResponse.overall_code>`.
       * [#not-implemented-hide:]
       * 
* * .envoy.service.ratelimit.v3.RateLimitResponse.Quota quota = 5; */ public Builder setQuota(io.envoyproxy.envoy.service.ratelimit.v3.RateLimitResponse.Quota value) { if (quotaBuilder_ == null) { if (value == null) { throw new NullPointerException(); } quota_ = value; onChanged(); } else { quotaBuilder_.setMessage(value); } return this; } /** *
       * Quota is available for a request if its descriptor set has cached quota available for all
       * descriptors.
       * This is for each individual descriptor in the descriptor set. The client will perform matches for each individual descriptor against available per-descriptor quota.
       * If quota is available, a RLS request will not be made and the quota will be reduced by 1 for
       * all matching descriptors.
       * If there is not sufficient quota, there are three cases:
       * 1. A cached entry exists for a RLS descriptor that is out-of-quota, but not expired.
       *    In this case, the request will be treated as OVER_LIMIT.
       * 2. Some RLS descriptors have a cached entry that has valid quota but some RLS descriptors
       *    have no cached entry. This will trigger a new RLS request.
       *    When the result is returned, a single unit will be consumed from the quota for all
       *    matching descriptors.
       *    If the server did not provide a quota, such as the quota message is empty for some of
       *    the descriptors, then the request admission is determined by the
       *    :ref:`overall_code <envoy_v3_api_field_service.ratelimit.v3.RateLimitResponse.overall_code>`.
       * 3. All RLS descriptors lack a cached entry, this will trigger a new RLS request,
       *    When the result is returned, a single unit will be consumed from the quota for all
       *    matching descriptors.
       *    If the server did not provide a quota, such as the quota message is empty for some of
       *    the descriptors, then the request admission is determined by the
       *    :ref:`overall_code <envoy_v3_api_field_service.ratelimit.v3.RateLimitResponse.overall_code>`.
       * [#not-implemented-hide:]
       * 
* * .envoy.service.ratelimit.v3.RateLimitResponse.Quota quota = 5; */ public Builder setQuota( io.envoyproxy.envoy.service.ratelimit.v3.RateLimitResponse.Quota.Builder builderForValue) { if (quotaBuilder_ == null) { quota_ = builderForValue.build(); onChanged(); } else { quotaBuilder_.setMessage(builderForValue.build()); } return this; } /** *
       * Quota is available for a request if its descriptor set has cached quota available for all
       * descriptors.
       * This is for each individual descriptor in the descriptor set. The client will perform matches for each individual descriptor against available per-descriptor quota.
       * If quota is available, a RLS request will not be made and the quota will be reduced by 1 for
       * all matching descriptors.
       * If there is not sufficient quota, there are three cases:
       * 1. A cached entry exists for a RLS descriptor that is out-of-quota, but not expired.
       *    In this case, the request will be treated as OVER_LIMIT.
       * 2. Some RLS descriptors have a cached entry that has valid quota but some RLS descriptors
       *    have no cached entry. This will trigger a new RLS request.
       *    When the result is returned, a single unit will be consumed from the quota for all
       *    matching descriptors.
       *    If the server did not provide a quota, such as the quota message is empty for some of
       *    the descriptors, then the request admission is determined by the
       *    :ref:`overall_code <envoy_v3_api_field_service.ratelimit.v3.RateLimitResponse.overall_code>`.
       * 3. All RLS descriptors lack a cached entry, this will trigger a new RLS request,
       *    When the result is returned, a single unit will be consumed from the quota for all
       *    matching descriptors.
       *    If the server did not provide a quota, such as the quota message is empty for some of
       *    the descriptors, then the request admission is determined by the
       *    :ref:`overall_code <envoy_v3_api_field_service.ratelimit.v3.RateLimitResponse.overall_code>`.
       * [#not-implemented-hide:]
       * 
* * .envoy.service.ratelimit.v3.RateLimitResponse.Quota quota = 5; */ public Builder mergeQuota(io.envoyproxy.envoy.service.ratelimit.v3.RateLimitResponse.Quota value) { if (quotaBuilder_ == null) { if (quota_ != null) { quota_ = io.envoyproxy.envoy.service.ratelimit.v3.RateLimitResponse.Quota.newBuilder(quota_).mergeFrom(value).buildPartial(); } else { quota_ = value; } onChanged(); } else { quotaBuilder_.mergeFrom(value); } return this; } /** *
       * Quota is available for a request if its descriptor set has cached quota available for all
       * descriptors.
       * This is for each individual descriptor in the descriptor set. The client will perform matches for each individual descriptor against available per-descriptor quota.
       * If quota is available, a RLS request will not be made and the quota will be reduced by 1 for
       * all matching descriptors.
       * If there is not sufficient quota, there are three cases:
       * 1. A cached entry exists for a RLS descriptor that is out-of-quota, but not expired.
       *    In this case, the request will be treated as OVER_LIMIT.
       * 2. Some RLS descriptors have a cached entry that has valid quota but some RLS descriptors
       *    have no cached entry. This will trigger a new RLS request.
       *    When the result is returned, a single unit will be consumed from the quota for all
       *    matching descriptors.
       *    If the server did not provide a quota, such as the quota message is empty for some of
       *    the descriptors, then the request admission is determined by the
       *    :ref:`overall_code <envoy_v3_api_field_service.ratelimit.v3.RateLimitResponse.overall_code>`.
       * 3. All RLS descriptors lack a cached entry, this will trigger a new RLS request,
       *    When the result is returned, a single unit will be consumed from the quota for all
       *    matching descriptors.
       *    If the server did not provide a quota, such as the quota message is empty for some of
       *    the descriptors, then the request admission is determined by the
       *    :ref:`overall_code <envoy_v3_api_field_service.ratelimit.v3.RateLimitResponse.overall_code>`.
       * [#not-implemented-hide:]
       * 
* * .envoy.service.ratelimit.v3.RateLimitResponse.Quota quota = 5; */ public Builder clearQuota() { if (quotaBuilder_ == null) { quota_ = null; onChanged(); } else { quota_ = null; quotaBuilder_ = null; } return this; } /** *
       * Quota is available for a request if its descriptor set has cached quota available for all
       * descriptors.
       * This is for each individual descriptor in the descriptor set. The client will perform matches for each individual descriptor against available per-descriptor quota.
       * If quota is available, a RLS request will not be made and the quota will be reduced by 1 for
       * all matching descriptors.
       * If there is not sufficient quota, there are three cases:
       * 1. A cached entry exists for a RLS descriptor that is out-of-quota, but not expired.
       *    In this case, the request will be treated as OVER_LIMIT.
       * 2. Some RLS descriptors have a cached entry that has valid quota but some RLS descriptors
       *    have no cached entry. This will trigger a new RLS request.
       *    When the result is returned, a single unit will be consumed from the quota for all
       *    matching descriptors.
       *    If the server did not provide a quota, such as the quota message is empty for some of
       *    the descriptors, then the request admission is determined by the
       *    :ref:`overall_code <envoy_v3_api_field_service.ratelimit.v3.RateLimitResponse.overall_code>`.
       * 3. All RLS descriptors lack a cached entry, this will trigger a new RLS request,
       *    When the result is returned, a single unit will be consumed from the quota for all
       *    matching descriptors.
       *    If the server did not provide a quota, such as the quota message is empty for some of
       *    the descriptors, then the request admission is determined by the
       *    :ref:`overall_code <envoy_v3_api_field_service.ratelimit.v3.RateLimitResponse.overall_code>`.
       * [#not-implemented-hide:]
       * 
* * .envoy.service.ratelimit.v3.RateLimitResponse.Quota quota = 5; */ public io.envoyproxy.envoy.service.ratelimit.v3.RateLimitResponse.Quota.Builder getQuotaBuilder() { onChanged(); return getQuotaFieldBuilder().getBuilder(); } /** *
       * Quota is available for a request if its descriptor set has cached quota available for all
       * descriptors.
       * This is for each individual descriptor in the descriptor set. The client will perform matches for each individual descriptor against available per-descriptor quota.
       * If quota is available, a RLS request will not be made and the quota will be reduced by 1 for
       * all matching descriptors.
       * If there is not sufficient quota, there are three cases:
       * 1. A cached entry exists for a RLS descriptor that is out-of-quota, but not expired.
       *    In this case, the request will be treated as OVER_LIMIT.
       * 2. Some RLS descriptors have a cached entry that has valid quota but some RLS descriptors
       *    have no cached entry. This will trigger a new RLS request.
       *    When the result is returned, a single unit will be consumed from the quota for all
       *    matching descriptors.
       *    If the server did not provide a quota, such as the quota message is empty for some of
       *    the descriptors, then the request admission is determined by the
       *    :ref:`overall_code <envoy_v3_api_field_service.ratelimit.v3.RateLimitResponse.overall_code>`.
       * 3. All RLS descriptors lack a cached entry, this will trigger a new RLS request,
       *    When the result is returned, a single unit will be consumed from the quota for all
       *    matching descriptors.
       *    If the server did not provide a quota, such as the quota message is empty for some of
       *    the descriptors, then the request admission is determined by the
       *    :ref:`overall_code <envoy_v3_api_field_service.ratelimit.v3.RateLimitResponse.overall_code>`.
       * [#not-implemented-hide:]
       * 
* * .envoy.service.ratelimit.v3.RateLimitResponse.Quota quota = 5; */ public io.envoyproxy.envoy.service.ratelimit.v3.RateLimitResponse.QuotaOrBuilder getQuotaOrBuilder() { if (quotaBuilder_ != null) { return quotaBuilder_.getMessageOrBuilder(); } else { return quota_ == null ? io.envoyproxy.envoy.service.ratelimit.v3.RateLimitResponse.Quota.getDefaultInstance() : quota_; } } /** *
       * Quota is available for a request if its descriptor set has cached quota available for all
       * descriptors.
       * This is for each individual descriptor in the descriptor set. The client will perform matches for each individual descriptor against available per-descriptor quota.
       * If quota is available, a RLS request will not be made and the quota will be reduced by 1 for
       * all matching descriptors.
       * If there is not sufficient quota, there are three cases:
       * 1. A cached entry exists for a RLS descriptor that is out-of-quota, but not expired.
       *    In this case, the request will be treated as OVER_LIMIT.
       * 2. Some RLS descriptors have a cached entry that has valid quota but some RLS descriptors
       *    have no cached entry. This will trigger a new RLS request.
       *    When the result is returned, a single unit will be consumed from the quota for all
       *    matching descriptors.
       *    If the server did not provide a quota, such as the quota message is empty for some of
       *    the descriptors, then the request admission is determined by the
       *    :ref:`overall_code <envoy_v3_api_field_service.ratelimit.v3.RateLimitResponse.overall_code>`.
       * 3. All RLS descriptors lack a cached entry, this will trigger a new RLS request,
       *    When the result is returned, a single unit will be consumed from the quota for all
       *    matching descriptors.
       *    If the server did not provide a quota, such as the quota message is empty for some of
       *    the descriptors, then the request admission is determined by the
       *    :ref:`overall_code <envoy_v3_api_field_service.ratelimit.v3.RateLimitResponse.overall_code>`.
       * [#not-implemented-hide:]
       * 
* * .envoy.service.ratelimit.v3.RateLimitResponse.Quota quota = 5; */ private com.google.protobuf.SingleFieldBuilderV3< io.envoyproxy.envoy.service.ratelimit.v3.RateLimitResponse.Quota, io.envoyproxy.envoy.service.ratelimit.v3.RateLimitResponse.Quota.Builder, io.envoyproxy.envoy.service.ratelimit.v3.RateLimitResponse.QuotaOrBuilder> getQuotaFieldBuilder() { if (quotaBuilder_ == null) { quotaBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< io.envoyproxy.envoy.service.ratelimit.v3.RateLimitResponse.Quota, io.envoyproxy.envoy.service.ratelimit.v3.RateLimitResponse.Quota.Builder, io.envoyproxy.envoy.service.ratelimit.v3.RateLimitResponse.QuotaOrBuilder>( getQuota(), getParentForChildren(), isClean()); quota_ = null; } return quotaBuilder_; } @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.service.ratelimit.v3.RateLimitResponse.DescriptorStatus) } // @@protoc_insertion_point(class_scope:envoy.service.ratelimit.v3.RateLimitResponse.DescriptorStatus) private static final io.envoyproxy.envoy.service.ratelimit.v3.RateLimitResponse.DescriptorStatus DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new io.envoyproxy.envoy.service.ratelimit.v3.RateLimitResponse.DescriptorStatus(); } public static io.envoyproxy.envoy.service.ratelimit.v3.RateLimitResponse.DescriptorStatus getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { @java.lang.Override public DescriptorStatus parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return new DescriptorStatus(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.service.ratelimit.v3.RateLimitResponse.DescriptorStatus getDefaultInstanceForType() { return DEFAULT_INSTANCE; } } public static final int OVERALL_CODE_FIELD_NUMBER = 1; private int overallCode_; /** *
   * The overall response code which takes into account all of the descriptors that were passed
   * in the RateLimitRequest message.
   * 
* * .envoy.service.ratelimit.v3.RateLimitResponse.Code overall_code = 1; * @return The enum numeric value on the wire for overallCode. */ @java.lang.Override public int getOverallCodeValue() { return overallCode_; } /** *
   * The overall response code which takes into account all of the descriptors that were passed
   * in the RateLimitRequest message.
   * 
* * .envoy.service.ratelimit.v3.RateLimitResponse.Code overall_code = 1; * @return The overallCode. */ @java.lang.Override public io.envoyproxy.envoy.service.ratelimit.v3.RateLimitResponse.Code getOverallCode() { @SuppressWarnings("deprecation") io.envoyproxy.envoy.service.ratelimit.v3.RateLimitResponse.Code result = io.envoyproxy.envoy.service.ratelimit.v3.RateLimitResponse.Code.valueOf(overallCode_); return result == null ? io.envoyproxy.envoy.service.ratelimit.v3.RateLimitResponse.Code.UNRECOGNIZED : result; } public static final int STATUSES_FIELD_NUMBER = 2; private java.util.List statuses_; /** *
   * A list of DescriptorStatus messages which matches the length of the descriptor list passed
   * in the RateLimitRequest. This can be used by the caller to determine which individual
   * descriptors failed and/or what the currently configured limits are for all of them.
   * 
* * repeated .envoy.service.ratelimit.v3.RateLimitResponse.DescriptorStatus statuses = 2; */ @java.lang.Override public java.util.List getStatusesList() { return statuses_; } /** *
   * A list of DescriptorStatus messages which matches the length of the descriptor list passed
   * in the RateLimitRequest. This can be used by the caller to determine which individual
   * descriptors failed and/or what the currently configured limits are for all of them.
   * 
* * repeated .envoy.service.ratelimit.v3.RateLimitResponse.DescriptorStatus statuses = 2; */ @java.lang.Override public java.util.List getStatusesOrBuilderList() { return statuses_; } /** *
   * A list of DescriptorStatus messages which matches the length of the descriptor list passed
   * in the RateLimitRequest. This can be used by the caller to determine which individual
   * descriptors failed and/or what the currently configured limits are for all of them.
   * 
* * repeated .envoy.service.ratelimit.v3.RateLimitResponse.DescriptorStatus statuses = 2; */ @java.lang.Override public int getStatusesCount() { return statuses_.size(); } /** *
   * A list of DescriptorStatus messages which matches the length of the descriptor list passed
   * in the RateLimitRequest. This can be used by the caller to determine which individual
   * descriptors failed and/or what the currently configured limits are for all of them.
   * 
* * repeated .envoy.service.ratelimit.v3.RateLimitResponse.DescriptorStatus statuses = 2; */ @java.lang.Override public io.envoyproxy.envoy.service.ratelimit.v3.RateLimitResponse.DescriptorStatus getStatuses(int index) { return statuses_.get(index); } /** *
   * A list of DescriptorStatus messages which matches the length of the descriptor list passed
   * in the RateLimitRequest. This can be used by the caller to determine which individual
   * descriptors failed and/or what the currently configured limits are for all of them.
   * 
* * repeated .envoy.service.ratelimit.v3.RateLimitResponse.DescriptorStatus statuses = 2; */ @java.lang.Override public io.envoyproxy.envoy.service.ratelimit.v3.RateLimitResponse.DescriptorStatusOrBuilder getStatusesOrBuilder( int index) { return statuses_.get(index); } public static final int RESPONSE_HEADERS_TO_ADD_FIELD_NUMBER = 3; private java.util.List responseHeadersToAdd_; /** *
   * A list of headers to add to the response
   * 
* * repeated .envoy.config.core.v3.HeaderValue response_headers_to_add = 3; */ @java.lang.Override public java.util.List getResponseHeadersToAddList() { return responseHeadersToAdd_; } /** *
   * A list of headers to add to the response
   * 
* * repeated .envoy.config.core.v3.HeaderValue response_headers_to_add = 3; */ @java.lang.Override public java.util.List getResponseHeadersToAddOrBuilderList() { return responseHeadersToAdd_; } /** *
   * A list of headers to add to the response
   * 
* * repeated .envoy.config.core.v3.HeaderValue response_headers_to_add = 3; */ @java.lang.Override public int getResponseHeadersToAddCount() { return responseHeadersToAdd_.size(); } /** *
   * A list of headers to add to the response
   * 
* * repeated .envoy.config.core.v3.HeaderValue response_headers_to_add = 3; */ @java.lang.Override public io.envoyproxy.envoy.config.core.v3.HeaderValue getResponseHeadersToAdd(int index) { return responseHeadersToAdd_.get(index); } /** *
   * A list of headers to add to the response
   * 
* * repeated .envoy.config.core.v3.HeaderValue response_headers_to_add = 3; */ @java.lang.Override public io.envoyproxy.envoy.config.core.v3.HeaderValueOrBuilder getResponseHeadersToAddOrBuilder( int index) { return responseHeadersToAdd_.get(index); } public static final int REQUEST_HEADERS_TO_ADD_FIELD_NUMBER = 4; private java.util.List requestHeadersToAdd_; /** *
   * A list of headers to add to the request when forwarded
   * 
* * repeated .envoy.config.core.v3.HeaderValue request_headers_to_add = 4; */ @java.lang.Override public java.util.List getRequestHeadersToAddList() { return requestHeadersToAdd_; } /** *
   * A list of headers to add to the request when forwarded
   * 
* * repeated .envoy.config.core.v3.HeaderValue request_headers_to_add = 4; */ @java.lang.Override public java.util.List getRequestHeadersToAddOrBuilderList() { return requestHeadersToAdd_; } /** *
   * A list of headers to add to the request when forwarded
   * 
* * repeated .envoy.config.core.v3.HeaderValue request_headers_to_add = 4; */ @java.lang.Override public int getRequestHeadersToAddCount() { return requestHeadersToAdd_.size(); } /** *
   * A list of headers to add to the request when forwarded
   * 
* * repeated .envoy.config.core.v3.HeaderValue request_headers_to_add = 4; */ @java.lang.Override public io.envoyproxy.envoy.config.core.v3.HeaderValue getRequestHeadersToAdd(int index) { return requestHeadersToAdd_.get(index); } /** *
   * A list of headers to add to the request when forwarded
   * 
* * repeated .envoy.config.core.v3.HeaderValue request_headers_to_add = 4; */ @java.lang.Override public io.envoyproxy.envoy.config.core.v3.HeaderValueOrBuilder getRequestHeadersToAddOrBuilder( int index) { return requestHeadersToAdd_.get(index); } public static final int RAW_BODY_FIELD_NUMBER = 5; private com.google.protobuf.ByteString rawBody_; /** *
   * A response body to send to the downstream client when the response code is not OK.
   * 
* * bytes raw_body = 5; * @return The rawBody. */ @java.lang.Override public com.google.protobuf.ByteString getRawBody() { return rawBody_; } public static final int DYNAMIC_METADATA_FIELD_NUMBER = 6; private com.google.protobuf.Struct dynamicMetadata_; /** *
   * Optional response metadata that will be emitted as dynamic metadata to be consumed by the next
   * filter. This metadata lives in a namespace specified by the canonical name of extension filter
   * that requires it:
   * - :ref:`envoy.filters.http.ratelimit <config_http_filters_ratelimit_dynamic_metadata>` for HTTP filter.
   * - :ref:`envoy.filters.network.ratelimit <config_network_filters_ratelimit_dynamic_metadata>` for network filter.
   * - :ref:`envoy.filters.thrift.rate_limit <config_thrift_filters_rate_limit_dynamic_metadata>` for Thrift filter.
   * 
* * .google.protobuf.Struct dynamic_metadata = 6; * @return Whether the dynamicMetadata field is set. */ @java.lang.Override public boolean hasDynamicMetadata() { return dynamicMetadata_ != null; } /** *
   * Optional response metadata that will be emitted as dynamic metadata to be consumed by the next
   * filter. This metadata lives in a namespace specified by the canonical name of extension filter
   * that requires it:
   * - :ref:`envoy.filters.http.ratelimit <config_http_filters_ratelimit_dynamic_metadata>` for HTTP filter.
   * - :ref:`envoy.filters.network.ratelimit <config_network_filters_ratelimit_dynamic_metadata>` for network filter.
   * - :ref:`envoy.filters.thrift.rate_limit <config_thrift_filters_rate_limit_dynamic_metadata>` for Thrift filter.
   * 
* * .google.protobuf.Struct dynamic_metadata = 6; * @return The dynamicMetadata. */ @java.lang.Override public com.google.protobuf.Struct getDynamicMetadata() { return dynamicMetadata_ == null ? com.google.protobuf.Struct.getDefaultInstance() : dynamicMetadata_; } /** *
   * Optional response metadata that will be emitted as dynamic metadata to be consumed by the next
   * filter. This metadata lives in a namespace specified by the canonical name of extension filter
   * that requires it:
   * - :ref:`envoy.filters.http.ratelimit <config_http_filters_ratelimit_dynamic_metadata>` for HTTP filter.
   * - :ref:`envoy.filters.network.ratelimit <config_network_filters_ratelimit_dynamic_metadata>` for network filter.
   * - :ref:`envoy.filters.thrift.rate_limit <config_thrift_filters_rate_limit_dynamic_metadata>` for Thrift filter.
   * 
* * .google.protobuf.Struct dynamic_metadata = 6; */ @java.lang.Override public com.google.protobuf.StructOrBuilder getDynamicMetadataOrBuilder() { return getDynamicMetadata(); } public static final int QUOTA_FIELD_NUMBER = 7; private io.envoyproxy.envoy.service.ratelimit.v3.RateLimitResponse.Quota quota_; /** *
   * Quota is available for a request if its entire descriptor set has cached quota available.
   * This is a union of all descriptors in the descriptor set. Clients can use the quota for future matches if and only if the descriptor set matches what was sent in the request that originated this response.
   * If quota is available, a RLS request will not be made and the quota will be reduced by 1.
   * If quota is not available (i.e., a cached entry doesn't exist for a RLS descriptor set), a RLS request will be triggered.
   * If the server did not provide a quota, such as the quota message is empty then the request admission is determined by the
   * :ref:`overall_code <envoy_v3_api_field_service.ratelimit.v3.RateLimitResponse.overall_code>`.
   * If there is not sufficient quota and the cached entry exists for a RLS descriptor set is out-of-quota but not expired,
   * the request will be treated as OVER_LIMIT.
   * [#not-implemented-hide:]
   * 
* * .envoy.service.ratelimit.v3.RateLimitResponse.Quota quota = 7; * @return Whether the quota field is set. */ @java.lang.Override public boolean hasQuota() { return quota_ != null; } /** *
   * Quota is available for a request if its entire descriptor set has cached quota available.
   * This is a union of all descriptors in the descriptor set. Clients can use the quota for future matches if and only if the descriptor set matches what was sent in the request that originated this response.
   * If quota is available, a RLS request will not be made and the quota will be reduced by 1.
   * If quota is not available (i.e., a cached entry doesn't exist for a RLS descriptor set), a RLS request will be triggered.
   * If the server did not provide a quota, such as the quota message is empty then the request admission is determined by the
   * :ref:`overall_code <envoy_v3_api_field_service.ratelimit.v3.RateLimitResponse.overall_code>`.
   * If there is not sufficient quota and the cached entry exists for a RLS descriptor set is out-of-quota but not expired,
   * the request will be treated as OVER_LIMIT.
   * [#not-implemented-hide:]
   * 
* * .envoy.service.ratelimit.v3.RateLimitResponse.Quota quota = 7; * @return The quota. */ @java.lang.Override public io.envoyproxy.envoy.service.ratelimit.v3.RateLimitResponse.Quota getQuota() { return quota_ == null ? io.envoyproxy.envoy.service.ratelimit.v3.RateLimitResponse.Quota.getDefaultInstance() : quota_; } /** *
   * Quota is available for a request if its entire descriptor set has cached quota available.
   * This is a union of all descriptors in the descriptor set. Clients can use the quota for future matches if and only if the descriptor set matches what was sent in the request that originated this response.
   * If quota is available, a RLS request will not be made and the quota will be reduced by 1.
   * If quota is not available (i.e., a cached entry doesn't exist for a RLS descriptor set), a RLS request will be triggered.
   * If the server did not provide a quota, such as the quota message is empty then the request admission is determined by the
   * :ref:`overall_code <envoy_v3_api_field_service.ratelimit.v3.RateLimitResponse.overall_code>`.
   * If there is not sufficient quota and the cached entry exists for a RLS descriptor set is out-of-quota but not expired,
   * the request will be treated as OVER_LIMIT.
   * [#not-implemented-hide:]
   * 
* * .envoy.service.ratelimit.v3.RateLimitResponse.Quota quota = 7; */ @java.lang.Override public io.envoyproxy.envoy.service.ratelimit.v3.RateLimitResponse.QuotaOrBuilder getQuotaOrBuilder() { return getQuota(); } 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 (overallCode_ != io.envoyproxy.envoy.service.ratelimit.v3.RateLimitResponse.Code.UNKNOWN.getNumber()) { output.writeEnum(1, overallCode_); } for (int i = 0; i < statuses_.size(); i++) { output.writeMessage(2, statuses_.get(i)); } for (int i = 0; i < responseHeadersToAdd_.size(); i++) { output.writeMessage(3, responseHeadersToAdd_.get(i)); } for (int i = 0; i < requestHeadersToAdd_.size(); i++) { output.writeMessage(4, requestHeadersToAdd_.get(i)); } if (!rawBody_.isEmpty()) { output.writeBytes(5, rawBody_); } if (dynamicMetadata_ != null) { output.writeMessage(6, getDynamicMetadata()); } if (quota_ != null) { output.writeMessage(7, getQuota()); } unknownFields.writeTo(output); } @java.lang.Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; if (overallCode_ != io.envoyproxy.envoy.service.ratelimit.v3.RateLimitResponse.Code.UNKNOWN.getNumber()) { size += com.google.protobuf.CodedOutputStream .computeEnumSize(1, overallCode_); } for (int i = 0; i < statuses_.size(); i++) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(2, statuses_.get(i)); } for (int i = 0; i < responseHeadersToAdd_.size(); i++) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(3, responseHeadersToAdd_.get(i)); } for (int i = 0; i < requestHeadersToAdd_.size(); i++) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(4, requestHeadersToAdd_.get(i)); } if (!rawBody_.isEmpty()) { size += com.google.protobuf.CodedOutputStream .computeBytesSize(5, rawBody_); } if (dynamicMetadata_ != null) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(6, getDynamicMetadata()); } if (quota_ != null) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(7, getQuota()); } 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.service.ratelimit.v3.RateLimitResponse)) { return super.equals(obj); } io.envoyproxy.envoy.service.ratelimit.v3.RateLimitResponse other = (io.envoyproxy.envoy.service.ratelimit.v3.RateLimitResponse) obj; if (overallCode_ != other.overallCode_) return false; if (!getStatusesList() .equals(other.getStatusesList())) return false; if (!getResponseHeadersToAddList() .equals(other.getResponseHeadersToAddList())) return false; if (!getRequestHeadersToAddList() .equals(other.getRequestHeadersToAddList())) return false; if (!getRawBody() .equals(other.getRawBody())) return false; if (hasDynamicMetadata() != other.hasDynamicMetadata()) return false; if (hasDynamicMetadata()) { if (!getDynamicMetadata() .equals(other.getDynamicMetadata())) return false; } if (hasQuota() != other.hasQuota()) return false; if (hasQuota()) { if (!getQuota() .equals(other.getQuota())) 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) + OVERALL_CODE_FIELD_NUMBER; hash = (53 * hash) + overallCode_; if (getStatusesCount() > 0) { hash = (37 * hash) + STATUSES_FIELD_NUMBER; hash = (53 * hash) + getStatusesList().hashCode(); } if (getResponseHeadersToAddCount() > 0) { hash = (37 * hash) + RESPONSE_HEADERS_TO_ADD_FIELD_NUMBER; hash = (53 * hash) + getResponseHeadersToAddList().hashCode(); } if (getRequestHeadersToAddCount() > 0) { hash = (37 * hash) + REQUEST_HEADERS_TO_ADD_FIELD_NUMBER; hash = (53 * hash) + getRequestHeadersToAddList().hashCode(); } hash = (37 * hash) + RAW_BODY_FIELD_NUMBER; hash = (53 * hash) + getRawBody().hashCode(); if (hasDynamicMetadata()) { hash = (37 * hash) + DYNAMIC_METADATA_FIELD_NUMBER; hash = (53 * hash) + getDynamicMetadata().hashCode(); } if (hasQuota()) { hash = (37 * hash) + QUOTA_FIELD_NUMBER; hash = (53 * hash) + getQuota().hashCode(); } hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; } public static io.envoyproxy.envoy.service.ratelimit.v3.RateLimitResponse parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static io.envoyproxy.envoy.service.ratelimit.v3.RateLimitResponse 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.service.ratelimit.v3.RateLimitResponse parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static io.envoyproxy.envoy.service.ratelimit.v3.RateLimitResponse 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.service.ratelimit.v3.RateLimitResponse parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static io.envoyproxy.envoy.service.ratelimit.v3.RateLimitResponse parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static io.envoyproxy.envoy.service.ratelimit.v3.RateLimitResponse parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static io.envoyproxy.envoy.service.ratelimit.v3.RateLimitResponse 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.service.ratelimit.v3.RateLimitResponse parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } public static io.envoyproxy.envoy.service.ratelimit.v3.RateLimitResponse 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.service.ratelimit.v3.RateLimitResponse parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static io.envoyproxy.envoy.service.ratelimit.v3.RateLimitResponse 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.service.ratelimit.v3.RateLimitResponse 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 response from a ShouldRateLimit call.
   * [#next-free-field: 8]
   * 
* * Protobuf type {@code envoy.service.ratelimit.v3.RateLimitResponse} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:envoy.service.ratelimit.v3.RateLimitResponse) io.envoyproxy.envoy.service.ratelimit.v3.RateLimitResponseOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return io.envoyproxy.envoy.service.ratelimit.v3.RlsProto.internal_static_envoy_service_ratelimit_v3_RateLimitResponse_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return io.envoyproxy.envoy.service.ratelimit.v3.RlsProto.internal_static_envoy_service_ratelimit_v3_RateLimitResponse_fieldAccessorTable .ensureFieldAccessorsInitialized( io.envoyproxy.envoy.service.ratelimit.v3.RateLimitResponse.class, io.envoyproxy.envoy.service.ratelimit.v3.RateLimitResponse.Builder.class); } // Construct using io.envoyproxy.envoy.service.ratelimit.v3.RateLimitResponse.newBuilder() private Builder() { maybeForceBuilderInitialization(); } private Builder( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessageV3 .alwaysUseFieldBuilders) { getStatusesFieldBuilder(); getResponseHeadersToAddFieldBuilder(); getRequestHeadersToAddFieldBuilder(); } } @java.lang.Override public Builder clear() { super.clear(); overallCode_ = 0; if (statusesBuilder_ == null) { statuses_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00000001); } else { statusesBuilder_.clear(); } if (responseHeadersToAddBuilder_ == null) { responseHeadersToAdd_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00000002); } else { responseHeadersToAddBuilder_.clear(); } if (requestHeadersToAddBuilder_ == null) { requestHeadersToAdd_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00000004); } else { requestHeadersToAddBuilder_.clear(); } rawBody_ = com.google.protobuf.ByteString.EMPTY; if (dynamicMetadataBuilder_ == null) { dynamicMetadata_ = null; } else { dynamicMetadata_ = null; dynamicMetadataBuilder_ = null; } if (quotaBuilder_ == null) { quota_ = null; } else { quota_ = null; quotaBuilder_ = null; } return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return io.envoyproxy.envoy.service.ratelimit.v3.RlsProto.internal_static_envoy_service_ratelimit_v3_RateLimitResponse_descriptor; } @java.lang.Override public io.envoyproxy.envoy.service.ratelimit.v3.RateLimitResponse getDefaultInstanceForType() { return io.envoyproxy.envoy.service.ratelimit.v3.RateLimitResponse.getDefaultInstance(); } @java.lang.Override public io.envoyproxy.envoy.service.ratelimit.v3.RateLimitResponse build() { io.envoyproxy.envoy.service.ratelimit.v3.RateLimitResponse result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } @java.lang.Override public io.envoyproxy.envoy.service.ratelimit.v3.RateLimitResponse buildPartial() { io.envoyproxy.envoy.service.ratelimit.v3.RateLimitResponse result = new io.envoyproxy.envoy.service.ratelimit.v3.RateLimitResponse(this); int from_bitField0_ = bitField0_; result.overallCode_ = overallCode_; if (statusesBuilder_ == null) { if (((bitField0_ & 0x00000001) != 0)) { statuses_ = java.util.Collections.unmodifiableList(statuses_); bitField0_ = (bitField0_ & ~0x00000001); } result.statuses_ = statuses_; } else { result.statuses_ = statusesBuilder_.build(); } if (responseHeadersToAddBuilder_ == null) { if (((bitField0_ & 0x00000002) != 0)) { responseHeadersToAdd_ = java.util.Collections.unmodifiableList(responseHeadersToAdd_); bitField0_ = (bitField0_ & ~0x00000002); } result.responseHeadersToAdd_ = responseHeadersToAdd_; } else { result.responseHeadersToAdd_ = responseHeadersToAddBuilder_.build(); } if (requestHeadersToAddBuilder_ == null) { if (((bitField0_ & 0x00000004) != 0)) { requestHeadersToAdd_ = java.util.Collections.unmodifiableList(requestHeadersToAdd_); bitField0_ = (bitField0_ & ~0x00000004); } result.requestHeadersToAdd_ = requestHeadersToAdd_; } else { result.requestHeadersToAdd_ = requestHeadersToAddBuilder_.build(); } result.rawBody_ = rawBody_; if (dynamicMetadataBuilder_ == null) { result.dynamicMetadata_ = dynamicMetadata_; } else { result.dynamicMetadata_ = dynamicMetadataBuilder_.build(); } if (quotaBuilder_ == null) { result.quota_ = quota_; } else { result.quota_ = quotaBuilder_.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.service.ratelimit.v3.RateLimitResponse) { return mergeFrom((io.envoyproxy.envoy.service.ratelimit.v3.RateLimitResponse)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(io.envoyproxy.envoy.service.ratelimit.v3.RateLimitResponse other) { if (other == io.envoyproxy.envoy.service.ratelimit.v3.RateLimitResponse.getDefaultInstance()) return this; if (other.overallCode_ != 0) { setOverallCodeValue(other.getOverallCodeValue()); } if (statusesBuilder_ == null) { if (!other.statuses_.isEmpty()) { if (statuses_.isEmpty()) { statuses_ = other.statuses_; bitField0_ = (bitField0_ & ~0x00000001); } else { ensureStatusesIsMutable(); statuses_.addAll(other.statuses_); } onChanged(); } } else { if (!other.statuses_.isEmpty()) { if (statusesBuilder_.isEmpty()) { statusesBuilder_.dispose(); statusesBuilder_ = null; statuses_ = other.statuses_; bitField0_ = (bitField0_ & ~0x00000001); statusesBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? getStatusesFieldBuilder() : null; } else { statusesBuilder_.addAllMessages(other.statuses_); } } } if (responseHeadersToAddBuilder_ == null) { if (!other.responseHeadersToAdd_.isEmpty()) { if (responseHeadersToAdd_.isEmpty()) { responseHeadersToAdd_ = other.responseHeadersToAdd_; bitField0_ = (bitField0_ & ~0x00000002); } else { ensureResponseHeadersToAddIsMutable(); responseHeadersToAdd_.addAll(other.responseHeadersToAdd_); } onChanged(); } } else { if (!other.responseHeadersToAdd_.isEmpty()) { if (responseHeadersToAddBuilder_.isEmpty()) { responseHeadersToAddBuilder_.dispose(); responseHeadersToAddBuilder_ = null; responseHeadersToAdd_ = other.responseHeadersToAdd_; bitField0_ = (bitField0_ & ~0x00000002); responseHeadersToAddBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? getResponseHeadersToAddFieldBuilder() : null; } else { responseHeadersToAddBuilder_.addAllMessages(other.responseHeadersToAdd_); } } } if (requestHeadersToAddBuilder_ == null) { if (!other.requestHeadersToAdd_.isEmpty()) { if (requestHeadersToAdd_.isEmpty()) { requestHeadersToAdd_ = other.requestHeadersToAdd_; bitField0_ = (bitField0_ & ~0x00000004); } else { ensureRequestHeadersToAddIsMutable(); requestHeadersToAdd_.addAll(other.requestHeadersToAdd_); } onChanged(); } } else { if (!other.requestHeadersToAdd_.isEmpty()) { if (requestHeadersToAddBuilder_.isEmpty()) { requestHeadersToAddBuilder_.dispose(); requestHeadersToAddBuilder_ = null; requestHeadersToAdd_ = other.requestHeadersToAdd_; bitField0_ = (bitField0_ & ~0x00000004); requestHeadersToAddBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? getRequestHeadersToAddFieldBuilder() : null; } else { requestHeadersToAddBuilder_.addAllMessages(other.requestHeadersToAdd_); } } } if (other.getRawBody() != com.google.protobuf.ByteString.EMPTY) { setRawBody(other.getRawBody()); } if (other.hasDynamicMetadata()) { mergeDynamicMetadata(other.getDynamicMetadata()); } if (other.hasQuota()) { mergeQuota(other.getQuota()); } 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.service.ratelimit.v3.RateLimitResponse parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = (io.envoyproxy.envoy.service.ratelimit.v3.RateLimitResponse) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { if (parsedMessage != null) { mergeFrom(parsedMessage); } } return this; } private int bitField0_; private int overallCode_ = 0; /** *
     * The overall response code which takes into account all of the descriptors that were passed
     * in the RateLimitRequest message.
     * 
* * .envoy.service.ratelimit.v3.RateLimitResponse.Code overall_code = 1; * @return The enum numeric value on the wire for overallCode. */ @java.lang.Override public int getOverallCodeValue() { return overallCode_; } /** *
     * The overall response code which takes into account all of the descriptors that were passed
     * in the RateLimitRequest message.
     * 
* * .envoy.service.ratelimit.v3.RateLimitResponse.Code overall_code = 1; * @param value The enum numeric value on the wire for overallCode to set. * @return This builder for chaining. */ public Builder setOverallCodeValue(int value) { overallCode_ = value; onChanged(); return this; } /** *
     * The overall response code which takes into account all of the descriptors that were passed
     * in the RateLimitRequest message.
     * 
* * .envoy.service.ratelimit.v3.RateLimitResponse.Code overall_code = 1; * @return The overallCode. */ @java.lang.Override public io.envoyproxy.envoy.service.ratelimit.v3.RateLimitResponse.Code getOverallCode() { @SuppressWarnings("deprecation") io.envoyproxy.envoy.service.ratelimit.v3.RateLimitResponse.Code result = io.envoyproxy.envoy.service.ratelimit.v3.RateLimitResponse.Code.valueOf(overallCode_); return result == null ? io.envoyproxy.envoy.service.ratelimit.v3.RateLimitResponse.Code.UNRECOGNIZED : result; } /** *
     * The overall response code which takes into account all of the descriptors that were passed
     * in the RateLimitRequest message.
     * 
* * .envoy.service.ratelimit.v3.RateLimitResponse.Code overall_code = 1; * @param value The overallCode to set. * @return This builder for chaining. */ public Builder setOverallCode(io.envoyproxy.envoy.service.ratelimit.v3.RateLimitResponse.Code value) { if (value == null) { throw new NullPointerException(); } overallCode_ = value.getNumber(); onChanged(); return this; } /** *
     * The overall response code which takes into account all of the descriptors that were passed
     * in the RateLimitRequest message.
     * 
* * .envoy.service.ratelimit.v3.RateLimitResponse.Code overall_code = 1; * @return This builder for chaining. */ public Builder clearOverallCode() { overallCode_ = 0; onChanged(); return this; } private java.util.List statuses_ = java.util.Collections.emptyList(); private void ensureStatusesIsMutable() { if (!((bitField0_ & 0x00000001) != 0)) { statuses_ = new java.util.ArrayList(statuses_); bitField0_ |= 0x00000001; } } private com.google.protobuf.RepeatedFieldBuilderV3< io.envoyproxy.envoy.service.ratelimit.v3.RateLimitResponse.DescriptorStatus, io.envoyproxy.envoy.service.ratelimit.v3.RateLimitResponse.DescriptorStatus.Builder, io.envoyproxy.envoy.service.ratelimit.v3.RateLimitResponse.DescriptorStatusOrBuilder> statusesBuilder_; /** *
     * A list of DescriptorStatus messages which matches the length of the descriptor list passed
     * in the RateLimitRequest. This can be used by the caller to determine which individual
     * descriptors failed and/or what the currently configured limits are for all of them.
     * 
* * repeated .envoy.service.ratelimit.v3.RateLimitResponse.DescriptorStatus statuses = 2; */ public java.util.List getStatusesList() { if (statusesBuilder_ == null) { return java.util.Collections.unmodifiableList(statuses_); } else { return statusesBuilder_.getMessageList(); } } /** *
     * A list of DescriptorStatus messages which matches the length of the descriptor list passed
     * in the RateLimitRequest. This can be used by the caller to determine which individual
     * descriptors failed and/or what the currently configured limits are for all of them.
     * 
* * repeated .envoy.service.ratelimit.v3.RateLimitResponse.DescriptorStatus statuses = 2; */ public int getStatusesCount() { if (statusesBuilder_ == null) { return statuses_.size(); } else { return statusesBuilder_.getCount(); } } /** *
     * A list of DescriptorStatus messages which matches the length of the descriptor list passed
     * in the RateLimitRequest. This can be used by the caller to determine which individual
     * descriptors failed and/or what the currently configured limits are for all of them.
     * 
* * repeated .envoy.service.ratelimit.v3.RateLimitResponse.DescriptorStatus statuses = 2; */ public io.envoyproxy.envoy.service.ratelimit.v3.RateLimitResponse.DescriptorStatus getStatuses(int index) { if (statusesBuilder_ == null) { return statuses_.get(index); } else { return statusesBuilder_.getMessage(index); } } /** *
     * A list of DescriptorStatus messages which matches the length of the descriptor list passed
     * in the RateLimitRequest. This can be used by the caller to determine which individual
     * descriptors failed and/or what the currently configured limits are for all of them.
     * 
* * repeated .envoy.service.ratelimit.v3.RateLimitResponse.DescriptorStatus statuses = 2; */ public Builder setStatuses( int index, io.envoyproxy.envoy.service.ratelimit.v3.RateLimitResponse.DescriptorStatus value) { if (statusesBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureStatusesIsMutable(); statuses_.set(index, value); onChanged(); } else { statusesBuilder_.setMessage(index, value); } return this; } /** *
     * A list of DescriptorStatus messages which matches the length of the descriptor list passed
     * in the RateLimitRequest. This can be used by the caller to determine which individual
     * descriptors failed and/or what the currently configured limits are for all of them.
     * 
* * repeated .envoy.service.ratelimit.v3.RateLimitResponse.DescriptorStatus statuses = 2; */ public Builder setStatuses( int index, io.envoyproxy.envoy.service.ratelimit.v3.RateLimitResponse.DescriptorStatus.Builder builderForValue) { if (statusesBuilder_ == null) { ensureStatusesIsMutable(); statuses_.set(index, builderForValue.build()); onChanged(); } else { statusesBuilder_.setMessage(index, builderForValue.build()); } return this; } /** *
     * A list of DescriptorStatus messages which matches the length of the descriptor list passed
     * in the RateLimitRequest. This can be used by the caller to determine which individual
     * descriptors failed and/or what the currently configured limits are for all of them.
     * 
* * repeated .envoy.service.ratelimit.v3.RateLimitResponse.DescriptorStatus statuses = 2; */ public Builder addStatuses(io.envoyproxy.envoy.service.ratelimit.v3.RateLimitResponse.DescriptorStatus value) { if (statusesBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureStatusesIsMutable(); statuses_.add(value); onChanged(); } else { statusesBuilder_.addMessage(value); } return this; } /** *
     * A list of DescriptorStatus messages which matches the length of the descriptor list passed
     * in the RateLimitRequest. This can be used by the caller to determine which individual
     * descriptors failed and/or what the currently configured limits are for all of them.
     * 
* * repeated .envoy.service.ratelimit.v3.RateLimitResponse.DescriptorStatus statuses = 2; */ public Builder addStatuses( int index, io.envoyproxy.envoy.service.ratelimit.v3.RateLimitResponse.DescriptorStatus value) { if (statusesBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureStatusesIsMutable(); statuses_.add(index, value); onChanged(); } else { statusesBuilder_.addMessage(index, value); } return this; } /** *
     * A list of DescriptorStatus messages which matches the length of the descriptor list passed
     * in the RateLimitRequest. This can be used by the caller to determine which individual
     * descriptors failed and/or what the currently configured limits are for all of them.
     * 
* * repeated .envoy.service.ratelimit.v3.RateLimitResponse.DescriptorStatus statuses = 2; */ public Builder addStatuses( io.envoyproxy.envoy.service.ratelimit.v3.RateLimitResponse.DescriptorStatus.Builder builderForValue) { if (statusesBuilder_ == null) { ensureStatusesIsMutable(); statuses_.add(builderForValue.build()); onChanged(); } else { statusesBuilder_.addMessage(builderForValue.build()); } return this; } /** *
     * A list of DescriptorStatus messages which matches the length of the descriptor list passed
     * in the RateLimitRequest. This can be used by the caller to determine which individual
     * descriptors failed and/or what the currently configured limits are for all of them.
     * 
* * repeated .envoy.service.ratelimit.v3.RateLimitResponse.DescriptorStatus statuses = 2; */ public Builder addStatuses( int index, io.envoyproxy.envoy.service.ratelimit.v3.RateLimitResponse.DescriptorStatus.Builder builderForValue) { if (statusesBuilder_ == null) { ensureStatusesIsMutable(); statuses_.add(index, builderForValue.build()); onChanged(); } else { statusesBuilder_.addMessage(index, builderForValue.build()); } return this; } /** *
     * A list of DescriptorStatus messages which matches the length of the descriptor list passed
     * in the RateLimitRequest. This can be used by the caller to determine which individual
     * descriptors failed and/or what the currently configured limits are for all of them.
     * 
* * repeated .envoy.service.ratelimit.v3.RateLimitResponse.DescriptorStatus statuses = 2; */ public Builder addAllStatuses( java.lang.Iterable values) { if (statusesBuilder_ == null) { ensureStatusesIsMutable(); com.google.protobuf.AbstractMessageLite.Builder.addAll( values, statuses_); onChanged(); } else { statusesBuilder_.addAllMessages(values); } return this; } /** *
     * A list of DescriptorStatus messages which matches the length of the descriptor list passed
     * in the RateLimitRequest. This can be used by the caller to determine which individual
     * descriptors failed and/or what the currently configured limits are for all of them.
     * 
* * repeated .envoy.service.ratelimit.v3.RateLimitResponse.DescriptorStatus statuses = 2; */ public Builder clearStatuses() { if (statusesBuilder_ == null) { statuses_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00000001); onChanged(); } else { statusesBuilder_.clear(); } return this; } /** *
     * A list of DescriptorStatus messages which matches the length of the descriptor list passed
     * in the RateLimitRequest. This can be used by the caller to determine which individual
     * descriptors failed and/or what the currently configured limits are for all of them.
     * 
* * repeated .envoy.service.ratelimit.v3.RateLimitResponse.DescriptorStatus statuses = 2; */ public Builder removeStatuses(int index) { if (statusesBuilder_ == null) { ensureStatusesIsMutable(); statuses_.remove(index); onChanged(); } else { statusesBuilder_.remove(index); } return this; } /** *
     * A list of DescriptorStatus messages which matches the length of the descriptor list passed
     * in the RateLimitRequest. This can be used by the caller to determine which individual
     * descriptors failed and/or what the currently configured limits are for all of them.
     * 
* * repeated .envoy.service.ratelimit.v3.RateLimitResponse.DescriptorStatus statuses = 2; */ public io.envoyproxy.envoy.service.ratelimit.v3.RateLimitResponse.DescriptorStatus.Builder getStatusesBuilder( int index) { return getStatusesFieldBuilder().getBuilder(index); } /** *
     * A list of DescriptorStatus messages which matches the length of the descriptor list passed
     * in the RateLimitRequest. This can be used by the caller to determine which individual
     * descriptors failed and/or what the currently configured limits are for all of them.
     * 
* * repeated .envoy.service.ratelimit.v3.RateLimitResponse.DescriptorStatus statuses = 2; */ public io.envoyproxy.envoy.service.ratelimit.v3.RateLimitResponse.DescriptorStatusOrBuilder getStatusesOrBuilder( int index) { if (statusesBuilder_ == null) { return statuses_.get(index); } else { return statusesBuilder_.getMessageOrBuilder(index); } } /** *
     * A list of DescriptorStatus messages which matches the length of the descriptor list passed
     * in the RateLimitRequest. This can be used by the caller to determine which individual
     * descriptors failed and/or what the currently configured limits are for all of them.
     * 
* * repeated .envoy.service.ratelimit.v3.RateLimitResponse.DescriptorStatus statuses = 2; */ public java.util.List getStatusesOrBuilderList() { if (statusesBuilder_ != null) { return statusesBuilder_.getMessageOrBuilderList(); } else { return java.util.Collections.unmodifiableList(statuses_); } } /** *
     * A list of DescriptorStatus messages which matches the length of the descriptor list passed
     * in the RateLimitRequest. This can be used by the caller to determine which individual
     * descriptors failed and/or what the currently configured limits are for all of them.
     * 
* * repeated .envoy.service.ratelimit.v3.RateLimitResponse.DescriptorStatus statuses = 2; */ public io.envoyproxy.envoy.service.ratelimit.v3.RateLimitResponse.DescriptorStatus.Builder addStatusesBuilder() { return getStatusesFieldBuilder().addBuilder( io.envoyproxy.envoy.service.ratelimit.v3.RateLimitResponse.DescriptorStatus.getDefaultInstance()); } /** *
     * A list of DescriptorStatus messages which matches the length of the descriptor list passed
     * in the RateLimitRequest. This can be used by the caller to determine which individual
     * descriptors failed and/or what the currently configured limits are for all of them.
     * 
* * repeated .envoy.service.ratelimit.v3.RateLimitResponse.DescriptorStatus statuses = 2; */ public io.envoyproxy.envoy.service.ratelimit.v3.RateLimitResponse.DescriptorStatus.Builder addStatusesBuilder( int index) { return getStatusesFieldBuilder().addBuilder( index, io.envoyproxy.envoy.service.ratelimit.v3.RateLimitResponse.DescriptorStatus.getDefaultInstance()); } /** *
     * A list of DescriptorStatus messages which matches the length of the descriptor list passed
     * in the RateLimitRequest. This can be used by the caller to determine which individual
     * descriptors failed and/or what the currently configured limits are for all of them.
     * 
* * repeated .envoy.service.ratelimit.v3.RateLimitResponse.DescriptorStatus statuses = 2; */ public java.util.List getStatusesBuilderList() { return getStatusesFieldBuilder().getBuilderList(); } private com.google.protobuf.RepeatedFieldBuilderV3< io.envoyproxy.envoy.service.ratelimit.v3.RateLimitResponse.DescriptorStatus, io.envoyproxy.envoy.service.ratelimit.v3.RateLimitResponse.DescriptorStatus.Builder, io.envoyproxy.envoy.service.ratelimit.v3.RateLimitResponse.DescriptorStatusOrBuilder> getStatusesFieldBuilder() { if (statusesBuilder_ == null) { statusesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< io.envoyproxy.envoy.service.ratelimit.v3.RateLimitResponse.DescriptorStatus, io.envoyproxy.envoy.service.ratelimit.v3.RateLimitResponse.DescriptorStatus.Builder, io.envoyproxy.envoy.service.ratelimit.v3.RateLimitResponse.DescriptorStatusOrBuilder>( statuses_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); statuses_ = null; } return statusesBuilder_; } private java.util.List responseHeadersToAdd_ = java.util.Collections.emptyList(); private void ensureResponseHeadersToAddIsMutable() { if (!((bitField0_ & 0x00000002) != 0)) { responseHeadersToAdd_ = new java.util.ArrayList(responseHeadersToAdd_); bitField0_ |= 0x00000002; } } private com.google.protobuf.RepeatedFieldBuilderV3< io.envoyproxy.envoy.config.core.v3.HeaderValue, io.envoyproxy.envoy.config.core.v3.HeaderValue.Builder, io.envoyproxy.envoy.config.core.v3.HeaderValueOrBuilder> responseHeadersToAddBuilder_; /** *
     * A list of headers to add to the response
     * 
* * repeated .envoy.config.core.v3.HeaderValue response_headers_to_add = 3; */ public java.util.List getResponseHeadersToAddList() { if (responseHeadersToAddBuilder_ == null) { return java.util.Collections.unmodifiableList(responseHeadersToAdd_); } else { return responseHeadersToAddBuilder_.getMessageList(); } } /** *
     * A list of headers to add to the response
     * 
* * repeated .envoy.config.core.v3.HeaderValue response_headers_to_add = 3; */ public int getResponseHeadersToAddCount() { if (responseHeadersToAddBuilder_ == null) { return responseHeadersToAdd_.size(); } else { return responseHeadersToAddBuilder_.getCount(); } } /** *
     * A list of headers to add to the response
     * 
* * repeated .envoy.config.core.v3.HeaderValue response_headers_to_add = 3; */ public io.envoyproxy.envoy.config.core.v3.HeaderValue getResponseHeadersToAdd(int index) { if (responseHeadersToAddBuilder_ == null) { return responseHeadersToAdd_.get(index); } else { return responseHeadersToAddBuilder_.getMessage(index); } } /** *
     * A list of headers to add to the response
     * 
* * repeated .envoy.config.core.v3.HeaderValue response_headers_to_add = 3; */ public Builder setResponseHeadersToAdd( int index, io.envoyproxy.envoy.config.core.v3.HeaderValue value) { if (responseHeadersToAddBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureResponseHeadersToAddIsMutable(); responseHeadersToAdd_.set(index, value); onChanged(); } else { responseHeadersToAddBuilder_.setMessage(index, value); } return this; } /** *
     * A list of headers to add to the response
     * 
* * repeated .envoy.config.core.v3.HeaderValue response_headers_to_add = 3; */ public Builder setResponseHeadersToAdd( int index, io.envoyproxy.envoy.config.core.v3.HeaderValue.Builder builderForValue) { if (responseHeadersToAddBuilder_ == null) { ensureResponseHeadersToAddIsMutable(); responseHeadersToAdd_.set(index, builderForValue.build()); onChanged(); } else { responseHeadersToAddBuilder_.setMessage(index, builderForValue.build()); } return this; } /** *
     * A list of headers to add to the response
     * 
* * repeated .envoy.config.core.v3.HeaderValue response_headers_to_add = 3; */ public Builder addResponseHeadersToAdd(io.envoyproxy.envoy.config.core.v3.HeaderValue value) { if (responseHeadersToAddBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureResponseHeadersToAddIsMutable(); responseHeadersToAdd_.add(value); onChanged(); } else { responseHeadersToAddBuilder_.addMessage(value); } return this; } /** *
     * A list of headers to add to the response
     * 
* * repeated .envoy.config.core.v3.HeaderValue response_headers_to_add = 3; */ public Builder addResponseHeadersToAdd( int index, io.envoyproxy.envoy.config.core.v3.HeaderValue value) { if (responseHeadersToAddBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureResponseHeadersToAddIsMutable(); responseHeadersToAdd_.add(index, value); onChanged(); } else { responseHeadersToAddBuilder_.addMessage(index, value); } return this; } /** *
     * A list of headers to add to the response
     * 
* * repeated .envoy.config.core.v3.HeaderValue response_headers_to_add = 3; */ public Builder addResponseHeadersToAdd( io.envoyproxy.envoy.config.core.v3.HeaderValue.Builder builderForValue) { if (responseHeadersToAddBuilder_ == null) { ensureResponseHeadersToAddIsMutable(); responseHeadersToAdd_.add(builderForValue.build()); onChanged(); } else { responseHeadersToAddBuilder_.addMessage(builderForValue.build()); } return this; } /** *
     * A list of headers to add to the response
     * 
* * repeated .envoy.config.core.v3.HeaderValue response_headers_to_add = 3; */ public Builder addResponseHeadersToAdd( int index, io.envoyproxy.envoy.config.core.v3.HeaderValue.Builder builderForValue) { if (responseHeadersToAddBuilder_ == null) { ensureResponseHeadersToAddIsMutable(); responseHeadersToAdd_.add(index, builderForValue.build()); onChanged(); } else { responseHeadersToAddBuilder_.addMessage(index, builderForValue.build()); } return this; } /** *
     * A list of headers to add to the response
     * 
* * repeated .envoy.config.core.v3.HeaderValue response_headers_to_add = 3; */ public Builder addAllResponseHeadersToAdd( java.lang.Iterable values) { if (responseHeadersToAddBuilder_ == null) { ensureResponseHeadersToAddIsMutable(); com.google.protobuf.AbstractMessageLite.Builder.addAll( values, responseHeadersToAdd_); onChanged(); } else { responseHeadersToAddBuilder_.addAllMessages(values); } return this; } /** *
     * A list of headers to add to the response
     * 
* * repeated .envoy.config.core.v3.HeaderValue response_headers_to_add = 3; */ public Builder clearResponseHeadersToAdd() { if (responseHeadersToAddBuilder_ == null) { responseHeadersToAdd_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00000002); onChanged(); } else { responseHeadersToAddBuilder_.clear(); } return this; } /** *
     * A list of headers to add to the response
     * 
* * repeated .envoy.config.core.v3.HeaderValue response_headers_to_add = 3; */ public Builder removeResponseHeadersToAdd(int index) { if (responseHeadersToAddBuilder_ == null) { ensureResponseHeadersToAddIsMutable(); responseHeadersToAdd_.remove(index); onChanged(); } else { responseHeadersToAddBuilder_.remove(index); } return this; } /** *
     * A list of headers to add to the response
     * 
* * repeated .envoy.config.core.v3.HeaderValue response_headers_to_add = 3; */ public io.envoyproxy.envoy.config.core.v3.HeaderValue.Builder getResponseHeadersToAddBuilder( int index) { return getResponseHeadersToAddFieldBuilder().getBuilder(index); } /** *
     * A list of headers to add to the response
     * 
* * repeated .envoy.config.core.v3.HeaderValue response_headers_to_add = 3; */ public io.envoyproxy.envoy.config.core.v3.HeaderValueOrBuilder getResponseHeadersToAddOrBuilder( int index) { if (responseHeadersToAddBuilder_ == null) { return responseHeadersToAdd_.get(index); } else { return responseHeadersToAddBuilder_.getMessageOrBuilder(index); } } /** *
     * A list of headers to add to the response
     * 
* * repeated .envoy.config.core.v3.HeaderValue response_headers_to_add = 3; */ public java.util.List getResponseHeadersToAddOrBuilderList() { if (responseHeadersToAddBuilder_ != null) { return responseHeadersToAddBuilder_.getMessageOrBuilderList(); } else { return java.util.Collections.unmodifiableList(responseHeadersToAdd_); } } /** *
     * A list of headers to add to the response
     * 
* * repeated .envoy.config.core.v3.HeaderValue response_headers_to_add = 3; */ public io.envoyproxy.envoy.config.core.v3.HeaderValue.Builder addResponseHeadersToAddBuilder() { return getResponseHeadersToAddFieldBuilder().addBuilder( io.envoyproxy.envoy.config.core.v3.HeaderValue.getDefaultInstance()); } /** *
     * A list of headers to add to the response
     * 
* * repeated .envoy.config.core.v3.HeaderValue response_headers_to_add = 3; */ public io.envoyproxy.envoy.config.core.v3.HeaderValue.Builder addResponseHeadersToAddBuilder( int index) { return getResponseHeadersToAddFieldBuilder().addBuilder( index, io.envoyproxy.envoy.config.core.v3.HeaderValue.getDefaultInstance()); } /** *
     * A list of headers to add to the response
     * 
* * repeated .envoy.config.core.v3.HeaderValue response_headers_to_add = 3; */ public java.util.List getResponseHeadersToAddBuilderList() { return getResponseHeadersToAddFieldBuilder().getBuilderList(); } private com.google.protobuf.RepeatedFieldBuilderV3< io.envoyproxy.envoy.config.core.v3.HeaderValue, io.envoyproxy.envoy.config.core.v3.HeaderValue.Builder, io.envoyproxy.envoy.config.core.v3.HeaderValueOrBuilder> getResponseHeadersToAddFieldBuilder() { if (responseHeadersToAddBuilder_ == null) { responseHeadersToAddBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< io.envoyproxy.envoy.config.core.v3.HeaderValue, io.envoyproxy.envoy.config.core.v3.HeaderValue.Builder, io.envoyproxy.envoy.config.core.v3.HeaderValueOrBuilder>( responseHeadersToAdd_, ((bitField0_ & 0x00000002) != 0), getParentForChildren(), isClean()); responseHeadersToAdd_ = null; } return responseHeadersToAddBuilder_; } private java.util.List requestHeadersToAdd_ = java.util.Collections.emptyList(); private void ensureRequestHeadersToAddIsMutable() { if (!((bitField0_ & 0x00000004) != 0)) { requestHeadersToAdd_ = new java.util.ArrayList(requestHeadersToAdd_); bitField0_ |= 0x00000004; } } private com.google.protobuf.RepeatedFieldBuilderV3< io.envoyproxy.envoy.config.core.v3.HeaderValue, io.envoyproxy.envoy.config.core.v3.HeaderValue.Builder, io.envoyproxy.envoy.config.core.v3.HeaderValueOrBuilder> requestHeadersToAddBuilder_; /** *
     * A list of headers to add to the request when forwarded
     * 
* * repeated .envoy.config.core.v3.HeaderValue request_headers_to_add = 4; */ public java.util.List getRequestHeadersToAddList() { if (requestHeadersToAddBuilder_ == null) { return java.util.Collections.unmodifiableList(requestHeadersToAdd_); } else { return requestHeadersToAddBuilder_.getMessageList(); } } /** *
     * A list of headers to add to the request when forwarded
     * 
* * repeated .envoy.config.core.v3.HeaderValue request_headers_to_add = 4; */ public int getRequestHeadersToAddCount() { if (requestHeadersToAddBuilder_ == null) { return requestHeadersToAdd_.size(); } else { return requestHeadersToAddBuilder_.getCount(); } } /** *
     * A list of headers to add to the request when forwarded
     * 
* * repeated .envoy.config.core.v3.HeaderValue request_headers_to_add = 4; */ public io.envoyproxy.envoy.config.core.v3.HeaderValue getRequestHeadersToAdd(int index) { if (requestHeadersToAddBuilder_ == null) { return requestHeadersToAdd_.get(index); } else { return requestHeadersToAddBuilder_.getMessage(index); } } /** *
     * A list of headers to add to the request when forwarded
     * 
* * repeated .envoy.config.core.v3.HeaderValue request_headers_to_add = 4; */ public Builder setRequestHeadersToAdd( int index, io.envoyproxy.envoy.config.core.v3.HeaderValue value) { if (requestHeadersToAddBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureRequestHeadersToAddIsMutable(); requestHeadersToAdd_.set(index, value); onChanged(); } else { requestHeadersToAddBuilder_.setMessage(index, value); } return this; } /** *
     * A list of headers to add to the request when forwarded
     * 
* * repeated .envoy.config.core.v3.HeaderValue request_headers_to_add = 4; */ public Builder setRequestHeadersToAdd( int index, io.envoyproxy.envoy.config.core.v3.HeaderValue.Builder builderForValue) { if (requestHeadersToAddBuilder_ == null) { ensureRequestHeadersToAddIsMutable(); requestHeadersToAdd_.set(index, builderForValue.build()); onChanged(); } else { requestHeadersToAddBuilder_.setMessage(index, builderForValue.build()); } return this; } /** *
     * A list of headers to add to the request when forwarded
     * 
* * repeated .envoy.config.core.v3.HeaderValue request_headers_to_add = 4; */ public Builder addRequestHeadersToAdd(io.envoyproxy.envoy.config.core.v3.HeaderValue value) { if (requestHeadersToAddBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureRequestHeadersToAddIsMutable(); requestHeadersToAdd_.add(value); onChanged(); } else { requestHeadersToAddBuilder_.addMessage(value); } return this; } /** *
     * A list of headers to add to the request when forwarded
     * 
* * repeated .envoy.config.core.v3.HeaderValue request_headers_to_add = 4; */ public Builder addRequestHeadersToAdd( int index, io.envoyproxy.envoy.config.core.v3.HeaderValue value) { if (requestHeadersToAddBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureRequestHeadersToAddIsMutable(); requestHeadersToAdd_.add(index, value); onChanged(); } else { requestHeadersToAddBuilder_.addMessage(index, value); } return this; } /** *
     * A list of headers to add to the request when forwarded
     * 
* * repeated .envoy.config.core.v3.HeaderValue request_headers_to_add = 4; */ public Builder addRequestHeadersToAdd( io.envoyproxy.envoy.config.core.v3.HeaderValue.Builder builderForValue) { if (requestHeadersToAddBuilder_ == null) { ensureRequestHeadersToAddIsMutable(); requestHeadersToAdd_.add(builderForValue.build()); onChanged(); } else { requestHeadersToAddBuilder_.addMessage(builderForValue.build()); } return this; } /** *
     * A list of headers to add to the request when forwarded
     * 
* * repeated .envoy.config.core.v3.HeaderValue request_headers_to_add = 4; */ public Builder addRequestHeadersToAdd( int index, io.envoyproxy.envoy.config.core.v3.HeaderValue.Builder builderForValue) { if (requestHeadersToAddBuilder_ == null) { ensureRequestHeadersToAddIsMutable(); requestHeadersToAdd_.add(index, builderForValue.build()); onChanged(); } else { requestHeadersToAddBuilder_.addMessage(index, builderForValue.build()); } return this; } /** *
     * A list of headers to add to the request when forwarded
     * 
* * repeated .envoy.config.core.v3.HeaderValue request_headers_to_add = 4; */ public Builder addAllRequestHeadersToAdd( java.lang.Iterable values) { if (requestHeadersToAddBuilder_ == null) { ensureRequestHeadersToAddIsMutable(); com.google.protobuf.AbstractMessageLite.Builder.addAll( values, requestHeadersToAdd_); onChanged(); } else { requestHeadersToAddBuilder_.addAllMessages(values); } return this; } /** *
     * A list of headers to add to the request when forwarded
     * 
* * repeated .envoy.config.core.v3.HeaderValue request_headers_to_add = 4; */ public Builder clearRequestHeadersToAdd() { if (requestHeadersToAddBuilder_ == null) { requestHeadersToAdd_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00000004); onChanged(); } else { requestHeadersToAddBuilder_.clear(); } return this; } /** *
     * A list of headers to add to the request when forwarded
     * 
* * repeated .envoy.config.core.v3.HeaderValue request_headers_to_add = 4; */ public Builder removeRequestHeadersToAdd(int index) { if (requestHeadersToAddBuilder_ == null) { ensureRequestHeadersToAddIsMutable(); requestHeadersToAdd_.remove(index); onChanged(); } else { requestHeadersToAddBuilder_.remove(index); } return this; } /** *
     * A list of headers to add to the request when forwarded
     * 
* * repeated .envoy.config.core.v3.HeaderValue request_headers_to_add = 4; */ public io.envoyproxy.envoy.config.core.v3.HeaderValue.Builder getRequestHeadersToAddBuilder( int index) { return getRequestHeadersToAddFieldBuilder().getBuilder(index); } /** *
     * A list of headers to add to the request when forwarded
     * 
* * repeated .envoy.config.core.v3.HeaderValue request_headers_to_add = 4; */ public io.envoyproxy.envoy.config.core.v3.HeaderValueOrBuilder getRequestHeadersToAddOrBuilder( int index) { if (requestHeadersToAddBuilder_ == null) { return requestHeadersToAdd_.get(index); } else { return requestHeadersToAddBuilder_.getMessageOrBuilder(index); } } /** *
     * A list of headers to add to the request when forwarded
     * 
* * repeated .envoy.config.core.v3.HeaderValue request_headers_to_add = 4; */ public java.util.List getRequestHeadersToAddOrBuilderList() { if (requestHeadersToAddBuilder_ != null) { return requestHeadersToAddBuilder_.getMessageOrBuilderList(); } else { return java.util.Collections.unmodifiableList(requestHeadersToAdd_); } } /** *
     * A list of headers to add to the request when forwarded
     * 
* * repeated .envoy.config.core.v3.HeaderValue request_headers_to_add = 4; */ public io.envoyproxy.envoy.config.core.v3.HeaderValue.Builder addRequestHeadersToAddBuilder() { return getRequestHeadersToAddFieldBuilder().addBuilder( io.envoyproxy.envoy.config.core.v3.HeaderValue.getDefaultInstance()); } /** *
     * A list of headers to add to the request when forwarded
     * 
* * repeated .envoy.config.core.v3.HeaderValue request_headers_to_add = 4; */ public io.envoyproxy.envoy.config.core.v3.HeaderValue.Builder addRequestHeadersToAddBuilder( int index) { return getRequestHeadersToAddFieldBuilder().addBuilder( index, io.envoyproxy.envoy.config.core.v3.HeaderValue.getDefaultInstance()); } /** *
     * A list of headers to add to the request when forwarded
     * 
* * repeated .envoy.config.core.v3.HeaderValue request_headers_to_add = 4; */ public java.util.List getRequestHeadersToAddBuilderList() { return getRequestHeadersToAddFieldBuilder().getBuilderList(); } private com.google.protobuf.RepeatedFieldBuilderV3< io.envoyproxy.envoy.config.core.v3.HeaderValue, io.envoyproxy.envoy.config.core.v3.HeaderValue.Builder, io.envoyproxy.envoy.config.core.v3.HeaderValueOrBuilder> getRequestHeadersToAddFieldBuilder() { if (requestHeadersToAddBuilder_ == null) { requestHeadersToAddBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< io.envoyproxy.envoy.config.core.v3.HeaderValue, io.envoyproxy.envoy.config.core.v3.HeaderValue.Builder, io.envoyproxy.envoy.config.core.v3.HeaderValueOrBuilder>( requestHeadersToAdd_, ((bitField0_ & 0x00000004) != 0), getParentForChildren(), isClean()); requestHeadersToAdd_ = null; } return requestHeadersToAddBuilder_; } private com.google.protobuf.ByteString rawBody_ = com.google.protobuf.ByteString.EMPTY; /** *
     * A response body to send to the downstream client when the response code is not OK.
     * 
* * bytes raw_body = 5; * @return The rawBody. */ @java.lang.Override public com.google.protobuf.ByteString getRawBody() { return rawBody_; } /** *
     * A response body to send to the downstream client when the response code is not OK.
     * 
* * bytes raw_body = 5; * @param value The rawBody to set. * @return This builder for chaining. */ public Builder setRawBody(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } rawBody_ = value; onChanged(); return this; } /** *
     * A response body to send to the downstream client when the response code is not OK.
     * 
* * bytes raw_body = 5; * @return This builder for chaining. */ public Builder clearRawBody() { rawBody_ = getDefaultInstance().getRawBody(); onChanged(); return this; } private com.google.protobuf.Struct dynamicMetadata_; private com.google.protobuf.SingleFieldBuilderV3< com.google.protobuf.Struct, com.google.protobuf.Struct.Builder, com.google.protobuf.StructOrBuilder> dynamicMetadataBuilder_; /** *
     * Optional response metadata that will be emitted as dynamic metadata to be consumed by the next
     * filter. This metadata lives in a namespace specified by the canonical name of extension filter
     * that requires it:
     * - :ref:`envoy.filters.http.ratelimit <config_http_filters_ratelimit_dynamic_metadata>` for HTTP filter.
     * - :ref:`envoy.filters.network.ratelimit <config_network_filters_ratelimit_dynamic_metadata>` for network filter.
     * - :ref:`envoy.filters.thrift.rate_limit <config_thrift_filters_rate_limit_dynamic_metadata>` for Thrift filter.
     * 
* * .google.protobuf.Struct dynamic_metadata = 6; * @return Whether the dynamicMetadata field is set. */ public boolean hasDynamicMetadata() { return dynamicMetadataBuilder_ != null || dynamicMetadata_ != null; } /** *
     * Optional response metadata that will be emitted as dynamic metadata to be consumed by the next
     * filter. This metadata lives in a namespace specified by the canonical name of extension filter
     * that requires it:
     * - :ref:`envoy.filters.http.ratelimit <config_http_filters_ratelimit_dynamic_metadata>` for HTTP filter.
     * - :ref:`envoy.filters.network.ratelimit <config_network_filters_ratelimit_dynamic_metadata>` for network filter.
     * - :ref:`envoy.filters.thrift.rate_limit <config_thrift_filters_rate_limit_dynamic_metadata>` for Thrift filter.
     * 
* * .google.protobuf.Struct dynamic_metadata = 6; * @return The dynamicMetadata. */ public com.google.protobuf.Struct getDynamicMetadata() { if (dynamicMetadataBuilder_ == null) { return dynamicMetadata_ == null ? com.google.protobuf.Struct.getDefaultInstance() : dynamicMetadata_; } else { return dynamicMetadataBuilder_.getMessage(); } } /** *
     * Optional response metadata that will be emitted as dynamic metadata to be consumed by the next
     * filter. This metadata lives in a namespace specified by the canonical name of extension filter
     * that requires it:
     * - :ref:`envoy.filters.http.ratelimit <config_http_filters_ratelimit_dynamic_metadata>` for HTTP filter.
     * - :ref:`envoy.filters.network.ratelimit <config_network_filters_ratelimit_dynamic_metadata>` for network filter.
     * - :ref:`envoy.filters.thrift.rate_limit <config_thrift_filters_rate_limit_dynamic_metadata>` for Thrift filter.
     * 
* * .google.protobuf.Struct dynamic_metadata = 6; */ public Builder setDynamicMetadata(com.google.protobuf.Struct value) { if (dynamicMetadataBuilder_ == null) { if (value == null) { throw new NullPointerException(); } dynamicMetadata_ = value; onChanged(); } else { dynamicMetadataBuilder_.setMessage(value); } return this; } /** *
     * Optional response metadata that will be emitted as dynamic metadata to be consumed by the next
     * filter. This metadata lives in a namespace specified by the canonical name of extension filter
     * that requires it:
     * - :ref:`envoy.filters.http.ratelimit <config_http_filters_ratelimit_dynamic_metadata>` for HTTP filter.
     * - :ref:`envoy.filters.network.ratelimit <config_network_filters_ratelimit_dynamic_metadata>` for network filter.
     * - :ref:`envoy.filters.thrift.rate_limit <config_thrift_filters_rate_limit_dynamic_metadata>` for Thrift filter.
     * 
* * .google.protobuf.Struct dynamic_metadata = 6; */ public Builder setDynamicMetadata( com.google.protobuf.Struct.Builder builderForValue) { if (dynamicMetadataBuilder_ == null) { dynamicMetadata_ = builderForValue.build(); onChanged(); } else { dynamicMetadataBuilder_.setMessage(builderForValue.build()); } return this; } /** *
     * Optional response metadata that will be emitted as dynamic metadata to be consumed by the next
     * filter. This metadata lives in a namespace specified by the canonical name of extension filter
     * that requires it:
     * - :ref:`envoy.filters.http.ratelimit <config_http_filters_ratelimit_dynamic_metadata>` for HTTP filter.
     * - :ref:`envoy.filters.network.ratelimit <config_network_filters_ratelimit_dynamic_metadata>` for network filter.
     * - :ref:`envoy.filters.thrift.rate_limit <config_thrift_filters_rate_limit_dynamic_metadata>` for Thrift filter.
     * 
* * .google.protobuf.Struct dynamic_metadata = 6; */ public Builder mergeDynamicMetadata(com.google.protobuf.Struct value) { if (dynamicMetadataBuilder_ == null) { if (dynamicMetadata_ != null) { dynamicMetadata_ = com.google.protobuf.Struct.newBuilder(dynamicMetadata_).mergeFrom(value).buildPartial(); } else { dynamicMetadata_ = value; } onChanged(); } else { dynamicMetadataBuilder_.mergeFrom(value); } return this; } /** *
     * Optional response metadata that will be emitted as dynamic metadata to be consumed by the next
     * filter. This metadata lives in a namespace specified by the canonical name of extension filter
     * that requires it:
     * - :ref:`envoy.filters.http.ratelimit <config_http_filters_ratelimit_dynamic_metadata>` for HTTP filter.
     * - :ref:`envoy.filters.network.ratelimit <config_network_filters_ratelimit_dynamic_metadata>` for network filter.
     * - :ref:`envoy.filters.thrift.rate_limit <config_thrift_filters_rate_limit_dynamic_metadata>` for Thrift filter.
     * 
* * .google.protobuf.Struct dynamic_metadata = 6; */ public Builder clearDynamicMetadata() { if (dynamicMetadataBuilder_ == null) { dynamicMetadata_ = null; onChanged(); } else { dynamicMetadata_ = null; dynamicMetadataBuilder_ = null; } return this; } /** *
     * Optional response metadata that will be emitted as dynamic metadata to be consumed by the next
     * filter. This metadata lives in a namespace specified by the canonical name of extension filter
     * that requires it:
     * - :ref:`envoy.filters.http.ratelimit <config_http_filters_ratelimit_dynamic_metadata>` for HTTP filter.
     * - :ref:`envoy.filters.network.ratelimit <config_network_filters_ratelimit_dynamic_metadata>` for network filter.
     * - :ref:`envoy.filters.thrift.rate_limit <config_thrift_filters_rate_limit_dynamic_metadata>` for Thrift filter.
     * 
* * .google.protobuf.Struct dynamic_metadata = 6; */ public com.google.protobuf.Struct.Builder getDynamicMetadataBuilder() { onChanged(); return getDynamicMetadataFieldBuilder().getBuilder(); } /** *
     * Optional response metadata that will be emitted as dynamic metadata to be consumed by the next
     * filter. This metadata lives in a namespace specified by the canonical name of extension filter
     * that requires it:
     * - :ref:`envoy.filters.http.ratelimit <config_http_filters_ratelimit_dynamic_metadata>` for HTTP filter.
     * - :ref:`envoy.filters.network.ratelimit <config_network_filters_ratelimit_dynamic_metadata>` for network filter.
     * - :ref:`envoy.filters.thrift.rate_limit <config_thrift_filters_rate_limit_dynamic_metadata>` for Thrift filter.
     * 
* * .google.protobuf.Struct dynamic_metadata = 6; */ public com.google.protobuf.StructOrBuilder getDynamicMetadataOrBuilder() { if (dynamicMetadataBuilder_ != null) { return dynamicMetadataBuilder_.getMessageOrBuilder(); } else { return dynamicMetadata_ == null ? com.google.protobuf.Struct.getDefaultInstance() : dynamicMetadata_; } } /** *
     * Optional response metadata that will be emitted as dynamic metadata to be consumed by the next
     * filter. This metadata lives in a namespace specified by the canonical name of extension filter
     * that requires it:
     * - :ref:`envoy.filters.http.ratelimit <config_http_filters_ratelimit_dynamic_metadata>` for HTTP filter.
     * - :ref:`envoy.filters.network.ratelimit <config_network_filters_ratelimit_dynamic_metadata>` for network filter.
     * - :ref:`envoy.filters.thrift.rate_limit <config_thrift_filters_rate_limit_dynamic_metadata>` for Thrift filter.
     * 
* * .google.protobuf.Struct dynamic_metadata = 6; */ private com.google.protobuf.SingleFieldBuilderV3< com.google.protobuf.Struct, com.google.protobuf.Struct.Builder, com.google.protobuf.StructOrBuilder> getDynamicMetadataFieldBuilder() { if (dynamicMetadataBuilder_ == null) { dynamicMetadataBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< com.google.protobuf.Struct, com.google.protobuf.Struct.Builder, com.google.protobuf.StructOrBuilder>( getDynamicMetadata(), getParentForChildren(), isClean()); dynamicMetadata_ = null; } return dynamicMetadataBuilder_; } private io.envoyproxy.envoy.service.ratelimit.v3.RateLimitResponse.Quota quota_; private com.google.protobuf.SingleFieldBuilderV3< io.envoyproxy.envoy.service.ratelimit.v3.RateLimitResponse.Quota, io.envoyproxy.envoy.service.ratelimit.v3.RateLimitResponse.Quota.Builder, io.envoyproxy.envoy.service.ratelimit.v3.RateLimitResponse.QuotaOrBuilder> quotaBuilder_; /** *
     * Quota is available for a request if its entire descriptor set has cached quota available.
     * This is a union of all descriptors in the descriptor set. Clients can use the quota for future matches if and only if the descriptor set matches what was sent in the request that originated this response.
     * If quota is available, a RLS request will not be made and the quota will be reduced by 1.
     * If quota is not available (i.e., a cached entry doesn't exist for a RLS descriptor set), a RLS request will be triggered.
     * If the server did not provide a quota, such as the quota message is empty then the request admission is determined by the
     * :ref:`overall_code <envoy_v3_api_field_service.ratelimit.v3.RateLimitResponse.overall_code>`.
     * If there is not sufficient quota and the cached entry exists for a RLS descriptor set is out-of-quota but not expired,
     * the request will be treated as OVER_LIMIT.
     * [#not-implemented-hide:]
     * 
* * .envoy.service.ratelimit.v3.RateLimitResponse.Quota quota = 7; * @return Whether the quota field is set. */ public boolean hasQuota() { return quotaBuilder_ != null || quota_ != null; } /** *
     * Quota is available for a request if its entire descriptor set has cached quota available.
     * This is a union of all descriptors in the descriptor set. Clients can use the quota for future matches if and only if the descriptor set matches what was sent in the request that originated this response.
     * If quota is available, a RLS request will not be made and the quota will be reduced by 1.
     * If quota is not available (i.e., a cached entry doesn't exist for a RLS descriptor set), a RLS request will be triggered.
     * If the server did not provide a quota, such as the quota message is empty then the request admission is determined by the
     * :ref:`overall_code <envoy_v3_api_field_service.ratelimit.v3.RateLimitResponse.overall_code>`.
     * If there is not sufficient quota and the cached entry exists for a RLS descriptor set is out-of-quota but not expired,
     * the request will be treated as OVER_LIMIT.
     * [#not-implemented-hide:]
     * 
* * .envoy.service.ratelimit.v3.RateLimitResponse.Quota quota = 7; * @return The quota. */ public io.envoyproxy.envoy.service.ratelimit.v3.RateLimitResponse.Quota getQuota() { if (quotaBuilder_ == null) { return quota_ == null ? io.envoyproxy.envoy.service.ratelimit.v3.RateLimitResponse.Quota.getDefaultInstance() : quota_; } else { return quotaBuilder_.getMessage(); } } /** *
     * Quota is available for a request if its entire descriptor set has cached quota available.
     * This is a union of all descriptors in the descriptor set. Clients can use the quota for future matches if and only if the descriptor set matches what was sent in the request that originated this response.
     * If quota is available, a RLS request will not be made and the quota will be reduced by 1.
     * If quota is not available (i.e., a cached entry doesn't exist for a RLS descriptor set), a RLS request will be triggered.
     * If the server did not provide a quota, such as the quota message is empty then the request admission is determined by the
     * :ref:`overall_code <envoy_v3_api_field_service.ratelimit.v3.RateLimitResponse.overall_code>`.
     * If there is not sufficient quota and the cached entry exists for a RLS descriptor set is out-of-quota but not expired,
     * the request will be treated as OVER_LIMIT.
     * [#not-implemented-hide:]
     * 
* * .envoy.service.ratelimit.v3.RateLimitResponse.Quota quota = 7; */ public Builder setQuota(io.envoyproxy.envoy.service.ratelimit.v3.RateLimitResponse.Quota value) { if (quotaBuilder_ == null) { if (value == null) { throw new NullPointerException(); } quota_ = value; onChanged(); } else { quotaBuilder_.setMessage(value); } return this; } /** *
     * Quota is available for a request if its entire descriptor set has cached quota available.
     * This is a union of all descriptors in the descriptor set. Clients can use the quota for future matches if and only if the descriptor set matches what was sent in the request that originated this response.
     * If quota is available, a RLS request will not be made and the quota will be reduced by 1.
     * If quota is not available (i.e., a cached entry doesn't exist for a RLS descriptor set), a RLS request will be triggered.
     * If the server did not provide a quota, such as the quota message is empty then the request admission is determined by the
     * :ref:`overall_code <envoy_v3_api_field_service.ratelimit.v3.RateLimitResponse.overall_code>`.
     * If there is not sufficient quota and the cached entry exists for a RLS descriptor set is out-of-quota but not expired,
     * the request will be treated as OVER_LIMIT.
     * [#not-implemented-hide:]
     * 
* * .envoy.service.ratelimit.v3.RateLimitResponse.Quota quota = 7; */ public Builder setQuota( io.envoyproxy.envoy.service.ratelimit.v3.RateLimitResponse.Quota.Builder builderForValue) { if (quotaBuilder_ == null) { quota_ = builderForValue.build(); onChanged(); } else { quotaBuilder_.setMessage(builderForValue.build()); } return this; } /** *
     * Quota is available for a request if its entire descriptor set has cached quota available.
     * This is a union of all descriptors in the descriptor set. Clients can use the quota for future matches if and only if the descriptor set matches what was sent in the request that originated this response.
     * If quota is available, a RLS request will not be made and the quota will be reduced by 1.
     * If quota is not available (i.e., a cached entry doesn't exist for a RLS descriptor set), a RLS request will be triggered.
     * If the server did not provide a quota, such as the quota message is empty then the request admission is determined by the
     * :ref:`overall_code <envoy_v3_api_field_service.ratelimit.v3.RateLimitResponse.overall_code>`.
     * If there is not sufficient quota and the cached entry exists for a RLS descriptor set is out-of-quota but not expired,
     * the request will be treated as OVER_LIMIT.
     * [#not-implemented-hide:]
     * 
* * .envoy.service.ratelimit.v3.RateLimitResponse.Quota quota = 7; */ public Builder mergeQuota(io.envoyproxy.envoy.service.ratelimit.v3.RateLimitResponse.Quota value) { if (quotaBuilder_ == null) { if (quota_ != null) { quota_ = io.envoyproxy.envoy.service.ratelimit.v3.RateLimitResponse.Quota.newBuilder(quota_).mergeFrom(value).buildPartial(); } else { quota_ = value; } onChanged(); } else { quotaBuilder_.mergeFrom(value); } return this; } /** *
     * Quota is available for a request if its entire descriptor set has cached quota available.
     * This is a union of all descriptors in the descriptor set. Clients can use the quota for future matches if and only if the descriptor set matches what was sent in the request that originated this response.
     * If quota is available, a RLS request will not be made and the quota will be reduced by 1.
     * If quota is not available (i.e., a cached entry doesn't exist for a RLS descriptor set), a RLS request will be triggered.
     * If the server did not provide a quota, such as the quota message is empty then the request admission is determined by the
     * :ref:`overall_code <envoy_v3_api_field_service.ratelimit.v3.RateLimitResponse.overall_code>`.
     * If there is not sufficient quota and the cached entry exists for a RLS descriptor set is out-of-quota but not expired,
     * the request will be treated as OVER_LIMIT.
     * [#not-implemented-hide:]
     * 
* * .envoy.service.ratelimit.v3.RateLimitResponse.Quota quota = 7; */ public Builder clearQuota() { if (quotaBuilder_ == null) { quota_ = null; onChanged(); } else { quota_ = null; quotaBuilder_ = null; } return this; } /** *
     * Quota is available for a request if its entire descriptor set has cached quota available.
     * This is a union of all descriptors in the descriptor set. Clients can use the quota for future matches if and only if the descriptor set matches what was sent in the request that originated this response.
     * If quota is available, a RLS request will not be made and the quota will be reduced by 1.
     * If quota is not available (i.e., a cached entry doesn't exist for a RLS descriptor set), a RLS request will be triggered.
     * If the server did not provide a quota, such as the quota message is empty then the request admission is determined by the
     * :ref:`overall_code <envoy_v3_api_field_service.ratelimit.v3.RateLimitResponse.overall_code>`.
     * If there is not sufficient quota and the cached entry exists for a RLS descriptor set is out-of-quota but not expired,
     * the request will be treated as OVER_LIMIT.
     * [#not-implemented-hide:]
     * 
* * .envoy.service.ratelimit.v3.RateLimitResponse.Quota quota = 7; */ public io.envoyproxy.envoy.service.ratelimit.v3.RateLimitResponse.Quota.Builder getQuotaBuilder() { onChanged(); return getQuotaFieldBuilder().getBuilder(); } /** *
     * Quota is available for a request if its entire descriptor set has cached quota available.
     * This is a union of all descriptors in the descriptor set. Clients can use the quota for future matches if and only if the descriptor set matches what was sent in the request that originated this response.
     * If quota is available, a RLS request will not be made and the quota will be reduced by 1.
     * If quota is not available (i.e., a cached entry doesn't exist for a RLS descriptor set), a RLS request will be triggered.
     * If the server did not provide a quota, such as the quota message is empty then the request admission is determined by the
     * :ref:`overall_code <envoy_v3_api_field_service.ratelimit.v3.RateLimitResponse.overall_code>`.
     * If there is not sufficient quota and the cached entry exists for a RLS descriptor set is out-of-quota but not expired,
     * the request will be treated as OVER_LIMIT.
     * [#not-implemented-hide:]
     * 
* * .envoy.service.ratelimit.v3.RateLimitResponse.Quota quota = 7; */ public io.envoyproxy.envoy.service.ratelimit.v3.RateLimitResponse.QuotaOrBuilder getQuotaOrBuilder() { if (quotaBuilder_ != null) { return quotaBuilder_.getMessageOrBuilder(); } else { return quota_ == null ? io.envoyproxy.envoy.service.ratelimit.v3.RateLimitResponse.Quota.getDefaultInstance() : quota_; } } /** *
     * Quota is available for a request if its entire descriptor set has cached quota available.
     * This is a union of all descriptors in the descriptor set. Clients can use the quota for future matches if and only if the descriptor set matches what was sent in the request that originated this response.
     * If quota is available, a RLS request will not be made and the quota will be reduced by 1.
     * If quota is not available (i.e., a cached entry doesn't exist for a RLS descriptor set), a RLS request will be triggered.
     * If the server did not provide a quota, such as the quota message is empty then the request admission is determined by the
     * :ref:`overall_code <envoy_v3_api_field_service.ratelimit.v3.RateLimitResponse.overall_code>`.
     * If there is not sufficient quota and the cached entry exists for a RLS descriptor set is out-of-quota but not expired,
     * the request will be treated as OVER_LIMIT.
     * [#not-implemented-hide:]
     * 
* * .envoy.service.ratelimit.v3.RateLimitResponse.Quota quota = 7; */ private com.google.protobuf.SingleFieldBuilderV3< io.envoyproxy.envoy.service.ratelimit.v3.RateLimitResponse.Quota, io.envoyproxy.envoy.service.ratelimit.v3.RateLimitResponse.Quota.Builder, io.envoyproxy.envoy.service.ratelimit.v3.RateLimitResponse.QuotaOrBuilder> getQuotaFieldBuilder() { if (quotaBuilder_ == null) { quotaBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< io.envoyproxy.envoy.service.ratelimit.v3.RateLimitResponse.Quota, io.envoyproxy.envoy.service.ratelimit.v3.RateLimitResponse.Quota.Builder, io.envoyproxy.envoy.service.ratelimit.v3.RateLimitResponse.QuotaOrBuilder>( getQuota(), getParentForChildren(), isClean()); quota_ = null; } return quotaBuilder_; } @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.service.ratelimit.v3.RateLimitResponse) } // @@protoc_insertion_point(class_scope:envoy.service.ratelimit.v3.RateLimitResponse) private static final io.envoyproxy.envoy.service.ratelimit.v3.RateLimitResponse DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new io.envoyproxy.envoy.service.ratelimit.v3.RateLimitResponse(); } public static io.envoyproxy.envoy.service.ratelimit.v3.RateLimitResponse getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { @java.lang.Override public RateLimitResponse parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return new RateLimitResponse(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.service.ratelimit.v3.RateLimitResponse getDefaultInstanceForType() { return DEFAULT_INSTANCE; } }