Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance. Project price only 1 $
You can buy this project and download/modify it how often you want.
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: envoy/service/ratelimit/v2/rls.proto
package io.envoyproxy.envoy.service.ratelimit.v2;
/**
*
* A response from a ShouldRateLimit call.
*
*
* Protobuf type {@code envoy.service.ratelimit.v2.RateLimitResponse}
*/
public final class RateLimitResponse extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:envoy.service.ratelimit.v2.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();
headers_ = java.util.Collections.emptyList();
}
@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;
default: {
if (!parseUnknownFieldProto3(
input, unknownFields, extensionRegistry, tag)) {
done = true;
}
break;
}
case 8: {
int rawValue = input.readEnum();
overallCode_ = rawValue;
break;
}
case 18: {
if (!((mutable_bitField0_ & 0x00000002) == 0x00000002)) {
statuses_ = new java.util.ArrayList();
mutable_bitField0_ |= 0x00000002;
}
statuses_.add(
input.readMessage(io.envoyproxy.envoy.service.ratelimit.v2.RateLimitResponse.DescriptorStatus.parser(), extensionRegistry));
break;
}
case 26: {
if (!((mutable_bitField0_ & 0x00000004) == 0x00000004)) {
headers_ = new java.util.ArrayList();
mutable_bitField0_ |= 0x00000004;
}
headers_.add(
input.readMessage(io.envoyproxy.envoy.api.v2.core.HeaderValue.parser(), extensionRegistry));
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(
e).setUnfinishedMessage(this);
} finally {
if (((mutable_bitField0_ & 0x00000002) == 0x00000002)) {
statuses_ = java.util.Collections.unmodifiableList(statuses_);
}
if (((mutable_bitField0_ & 0x00000004) == 0x00000004)) {
headers_ = java.util.Collections.unmodifiableList(headers_);
}
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return io.envoyproxy.envoy.service.ratelimit.v2.RlsProto.internal_static_envoy_service_ratelimit_v2_RateLimitResponse_descriptor;
}
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return io.envoyproxy.envoy.service.ratelimit.v2.RlsProto.internal_static_envoy_service_ratelimit_v2_RateLimitResponse_fieldAccessorTable
.ensureFieldAccessorsInitialized(
io.envoyproxy.envoy.service.ratelimit.v2.RateLimitResponse.class, io.envoyproxy.envoy.service.ratelimit.v2.RateLimitResponse.Builder.class);
}
/**
* Protobuf enum {@code envoy.service.ratelimit.v2.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.
*
*
* 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;
}
/**
* @deprecated Use {@link #forNumber(int)} instead.
*/
@java.lang.Deprecated
public static Code valueOf(int value) {
return forNumber(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() {
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.v2.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.v2.RateLimitResponse.Code)
}
public interface RateLimitOrBuilder extends
// @@protoc_insertion_point(interface_extends:envoy.service.ratelimit.v2.RateLimitResponse.RateLimit)
com.google.protobuf.MessageOrBuilder {
/**
*
* Defines an actual rate limit in terms of requests per unit of time and the unit itself.
*
*
* Protobuf type {@code envoy.service.ratelimit.v2.RateLimitResponse.RateLimit}
*/
public static final class RateLimit extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:envoy.service.ratelimit.v2.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() {
requestsPerUnit_ = 0;
unit_ = 0;
}
@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();
}
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;
default: {
if (!parseUnknownFieldProto3(
input, unknownFields, extensionRegistry, tag)) {
done = true;
}
break;
}
case 8: {
requestsPerUnit_ = input.readUInt32();
break;
}
case 16: {
int rawValue = input.readEnum();
unit_ = rawValue;
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.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.v2.RlsProto.internal_static_envoy_service_ratelimit_v2_RateLimitResponse_RateLimit_descriptor;
}
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return io.envoyproxy.envoy.service.ratelimit.v2.RlsProto.internal_static_envoy_service_ratelimit_v2_RateLimitResponse_RateLimit_fieldAccessorTable
.ensureFieldAccessorsInitialized(
io.envoyproxy.envoy.service.ratelimit.v2.RateLimitResponse.RateLimit.class, io.envoyproxy.envoy.service.ratelimit.v2.RateLimitResponse.RateLimit.Builder.class);
}
/**
* Protobuf enum {@code envoy.service.ratelimit.v2.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),
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;
public final int getNumber() {
if (this == UNRECOGNIZED) {
throw new java.lang.IllegalArgumentException(
"Can't get the number of an unknown enum value.");
}
return value;
}
/**
* @deprecated Use {@link #forNumber(int)} instead.
*/
@java.lang.Deprecated
public static Unit valueOf(int value) {
return forNumber(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;
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() {
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.v2.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.v2.RateLimitResponse.RateLimit.Unit)
}
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;
*/
public int getRequestsPerUnit() {
return requestsPerUnit_;
}
public static final int UNIT_FIELD_NUMBER = 2;
private int unit_;
/**
*
* The unit of time.
*
*
* .envoy.service.ratelimit.v2.RateLimitResponse.RateLimit.Unit unit = 2;
*/
public int getUnitValue() {
return unit_;
}
/**
*
* The unit of time.
*
*
* .envoy.service.ratelimit.v2.RateLimitResponse.RateLimit.Unit unit = 2;
*/
public io.envoyproxy.envoy.service.ratelimit.v2.RateLimitResponse.RateLimit.Unit getUnit() {
io.envoyproxy.envoy.service.ratelimit.v2.RateLimitResponse.RateLimit.Unit result = io.envoyproxy.envoy.service.ratelimit.v2.RateLimitResponse.RateLimit.Unit.valueOf(unit_);
return result == null ? io.envoyproxy.envoy.service.ratelimit.v2.RateLimitResponse.RateLimit.Unit.UNRECOGNIZED : result;
}
private byte memoizedIsInitialized = -1;
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
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.v2.RateLimitResponse.RateLimit.Unit.UNKNOWN.getNumber()) {
output.writeEnum(2, unit_);
}
unknownFields.writeTo(output);
}
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.v2.RateLimitResponse.RateLimit.Unit.UNKNOWN.getNumber()) {
size += com.google.protobuf.CodedOutputStream
.computeEnumSize(2, unit_);
}
size += unknownFields.getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof io.envoyproxy.envoy.service.ratelimit.v2.RateLimitResponse.RateLimit)) {
return super.equals(obj);
}
io.envoyproxy.envoy.service.ratelimit.v2.RateLimitResponse.RateLimit other = (io.envoyproxy.envoy.service.ratelimit.v2.RateLimitResponse.RateLimit) obj;
boolean result = true;
result = result && (getRequestsPerUnit()
== other.getRequestsPerUnit());
result = result && unit_ == other.unit_;
result = result && unknownFields.equals(other.unknownFields);
return result;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
hash = (37 * hash) + REQUESTS_PER_UNIT_FIELD_NUMBER;
hash = (53 * hash) + getRequestsPerUnit();
hash = (37 * hash) + UNIT_FIELD_NUMBER;
hash = (53 * hash) + unit_;
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static io.envoyproxy.envoy.service.ratelimit.v2.RateLimitResponse.RateLimit parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.envoyproxy.envoy.service.ratelimit.v2.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.v2.RateLimitResponse.RateLimit parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.envoyproxy.envoy.service.ratelimit.v2.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.v2.RateLimitResponse.RateLimit parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.envoyproxy.envoy.service.ratelimit.v2.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.v2.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.v2.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.v2.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.v2.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.v2.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.v2.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);
}
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(io.envoyproxy.envoy.service.ratelimit.v2.RateLimitResponse.RateLimit prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
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.v2.RateLimitResponse.RateLimit}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:envoy.service.ratelimit.v2.RateLimitResponse.RateLimit)
io.envoyproxy.envoy.service.ratelimit.v2.RateLimitResponse.RateLimitOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return io.envoyproxy.envoy.service.ratelimit.v2.RlsProto.internal_static_envoy_service_ratelimit_v2_RateLimitResponse_RateLimit_descriptor;
}
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return io.envoyproxy.envoy.service.ratelimit.v2.RlsProto.internal_static_envoy_service_ratelimit_v2_RateLimitResponse_RateLimit_fieldAccessorTable
.ensureFieldAccessorsInitialized(
io.envoyproxy.envoy.service.ratelimit.v2.RateLimitResponse.RateLimit.class, io.envoyproxy.envoy.service.ratelimit.v2.RateLimitResponse.RateLimit.Builder.class);
}
// Construct using io.envoyproxy.envoy.service.ratelimit.v2.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) {
}
}
public Builder clear() {
super.clear();
requestsPerUnit_ = 0;
unit_ = 0;
return this;
}
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return io.envoyproxy.envoy.service.ratelimit.v2.RlsProto.internal_static_envoy_service_ratelimit_v2_RateLimitResponse_RateLimit_descriptor;
}
public io.envoyproxy.envoy.service.ratelimit.v2.RateLimitResponse.RateLimit getDefaultInstanceForType() {
return io.envoyproxy.envoy.service.ratelimit.v2.RateLimitResponse.RateLimit.getDefaultInstance();
}
public io.envoyproxy.envoy.service.ratelimit.v2.RateLimitResponse.RateLimit build() {
io.envoyproxy.envoy.service.ratelimit.v2.RateLimitResponse.RateLimit result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
public io.envoyproxy.envoy.service.ratelimit.v2.RateLimitResponse.RateLimit buildPartial() {
io.envoyproxy.envoy.service.ratelimit.v2.RateLimitResponse.RateLimit result = new io.envoyproxy.envoy.service.ratelimit.v2.RateLimitResponse.RateLimit(this);
result.requestsPerUnit_ = requestsPerUnit_;
result.unit_ = unit_;
onBuilt();
return result;
}
public Builder clone() {
return (Builder) super.clone();
}
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return (Builder) super.setField(field, value);
}
public Builder clearField(
com.google.protobuf.Descriptors.FieldDescriptor field) {
return (Builder) super.clearField(field);
}
public Builder clearOneof(
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return (Builder) super.clearOneof(oneof);
}
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index, java.lang.Object value) {
return (Builder) super.setRepeatedField(field, index, value);
}
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return (Builder) super.addRepeatedField(field, value);
}
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof io.envoyproxy.envoy.service.ratelimit.v2.RateLimitResponse.RateLimit) {
return mergeFrom((io.envoyproxy.envoy.service.ratelimit.v2.RateLimitResponse.RateLimit)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(io.envoyproxy.envoy.service.ratelimit.v2.RateLimitResponse.RateLimit other) {
if (other == io.envoyproxy.envoy.service.ratelimit.v2.RateLimitResponse.RateLimit.getDefaultInstance()) return this;
if (other.getRequestsPerUnit() != 0) {
setRequestsPerUnit(other.getRequestsPerUnit());
}
if (other.unit_ != 0) {
setUnitValue(other.getUnitValue());
}
this.mergeUnknownFields(other.unknownFields);
onChanged();
return this;
}
public final boolean isInitialized() {
return true;
}
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
io.envoyproxy.envoy.service.ratelimit.v2.RateLimitResponse.RateLimit parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (io.envoyproxy.envoy.service.ratelimit.v2.RateLimitResponse.RateLimit) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int requestsPerUnit_ ;
/**
*
* The number of requests per unit of time.
*
*
* uint32 requests_per_unit = 1;
*/
public int getRequestsPerUnit() {
return requestsPerUnit_;
}
/**
*
*
* uint32 limit_remaining = 3;
*/
public Builder clearLimitRemaining() {
limitRemaining_ = 0;
onChanged();
return this;
}
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFieldsProto3(unknownFields);
}
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:envoy.service.ratelimit.v2.RateLimitResponse.DescriptorStatus)
}
// @@protoc_insertion_point(class_scope:envoy.service.ratelimit.v2.RateLimitResponse.DescriptorStatus)
private static final io.envoyproxy.envoy.service.ratelimit.v2.RateLimitResponse.DescriptorStatus DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new io.envoyproxy.envoy.service.ratelimit.v2.RateLimitResponse.DescriptorStatus();
}
public static io.envoyproxy.envoy.service.ratelimit.v2.RateLimitResponse.DescriptorStatus getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
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;
}
public io.envoyproxy.envoy.service.ratelimit.v2.RateLimitResponse.DescriptorStatus getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
private int bitField0_;
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.v2.RateLimitResponse.Code overall_code = 1;
*/
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.v2.RateLimitResponse.Code overall_code = 1;
*/
public io.envoyproxy.envoy.service.ratelimit.v2.RateLimitResponse.Code getOverallCode() {
io.envoyproxy.envoy.service.ratelimit.v2.RateLimitResponse.Code result = io.envoyproxy.envoy.service.ratelimit.v2.RateLimitResponse.Code.valueOf(overallCode_);
return result == null ? io.envoyproxy.envoy.service.ratelimit.v2.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.
*
* 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.
*
* 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.v2.RateLimitResponse.DescriptorStatus statuses = 2;
*/
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.
*
* 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.v2.RateLimitResponse.DescriptorStatus statuses = 2;
*/
public io.envoyproxy.envoy.service.ratelimit.v2.RateLimitResponse.DescriptorStatusOrBuilder getStatusesOrBuilder(
int index) {
return statuses_.get(index);
}
public static final int HEADERS_FIELD_NUMBER = 3;
private java.util.List headers_;
/**
*
* 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.
*
* 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.v2.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.
*
* 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.v2.RateLimitResponse.DescriptorStatus statuses = 2;
*/
public Builder setStatuses(
int index, io.envoyproxy.envoy.service.ratelimit.v2.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.
*
* 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.v2.RateLimitResponse.DescriptorStatus statuses = 2;
*/
public Builder addStatuses(io.envoyproxy.envoy.service.ratelimit.v2.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.v2.RateLimitResponse.DescriptorStatus statuses = 2;
*/
public Builder addStatuses(
int index, io.envoyproxy.envoy.service.ratelimit.v2.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.
*
* 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.
*
* 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.
*
* 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.
*
* 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.
*
* 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.v2.RateLimitResponse.DescriptorStatus statuses = 2;
*/
public io.envoyproxy.envoy.service.ratelimit.v2.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.v2.RateLimitResponse.DescriptorStatus statuses = 2;
*/
public io.envoyproxy.envoy.service.ratelimit.v2.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.
*
* 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.
*
* 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.
*
* 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.
*