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

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

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

/**
 * 
 * Main message for a rate limit request. The rate limit service is designed to be fully generic
 * in the sense that it can operate on arbitrary hierarchical key/value pairs. The loaded
 * configuration will parse the request and find the most specific limit to apply. In addition,
 * a RateLimitRequest can contain multiple "descriptors" to limit on. When multiple descriptors
 * are provided, the server will limit on *ALL* of them and return an OVER_LIMIT response if any
 * of them are over limit. This enables more complex application level rate limiting scenarios
 * if desired.
 * 
* * Protobuf type {@code envoy.service.ratelimit.v3alpha.RateLimitRequest} */ public final class RateLimitRequest extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:envoy.service.ratelimit.v3alpha.RateLimitRequest) RateLimitRequestOrBuilder { private static final long serialVersionUID = 0L; // Use RateLimitRequest.newBuilder() to construct. private RateLimitRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } private RateLimitRequest() { domain_ = ""; descriptors_ = java.util.Collections.emptyList(); } @java.lang.Override @SuppressWarnings({"unused"}) protected java.lang.Object newInstance( UnusedPrivateParameter unused) { return new RateLimitRequest(); } @java.lang.Override public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } private RateLimitRequest( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { this(); if (extensionRegistry == null) { throw new java.lang.NullPointerException(); } int mutable_bitField0_ = 0; com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder(); try { boolean done = false; while (!done) { int tag = input.readTag(); switch (tag) { case 0: done = true; break; case 10: { java.lang.String s = input.readStringRequireUtf8(); domain_ = s; break; } case 18: { if (!((mutable_bitField0_ & 0x00000001) != 0)) { descriptors_ = new java.util.ArrayList(); mutable_bitField0_ |= 0x00000001; } descriptors_.add( input.readMessage(io.envoyproxy.envoy.api.v3alpha.ratelimit.RateLimitDescriptor.parser(), extensionRegistry)); break; } case 24: { hitsAddend_ = input.readUInt32(); break; } default: { if (!parseUnknownField( input, unknownFields, extensionRegistry, tag)) { done = true; } 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_ & 0x00000001) != 0)) { descriptors_ = java.util.Collections.unmodifiableList(descriptors_); } this.unknownFields = unknownFields.build(); makeExtensionsImmutable(); } } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return io.envoyproxy.envoy.service.ratelimit.v3alpha.RlsProto.internal_static_envoy_service_ratelimit_v3alpha_RateLimitRequest_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return io.envoyproxy.envoy.service.ratelimit.v3alpha.RlsProto.internal_static_envoy_service_ratelimit_v3alpha_RateLimitRequest_fieldAccessorTable .ensureFieldAccessorsInitialized( io.envoyproxy.envoy.service.ratelimit.v3alpha.RateLimitRequest.class, io.envoyproxy.envoy.service.ratelimit.v3alpha.RateLimitRequest.Builder.class); } public static final int DOMAIN_FIELD_NUMBER = 1; private volatile java.lang.Object domain_; /** *
   * All rate limit requests must specify a domain. This enables the configuration to be per
   * application without fear of overlap. E.g., "envoy".
   * 
* * string domain = 1; */ public java.lang.String getDomain() { java.lang.Object ref = domain_; 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(); domain_ = s; return s; } } /** *
   * All rate limit requests must specify a domain. This enables the configuration to be per
   * application without fear of overlap. E.g., "envoy".
   * 
* * string domain = 1; */ public com.google.protobuf.ByteString getDomainBytes() { java.lang.Object ref = domain_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); domain_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } public static final int DESCRIPTORS_FIELD_NUMBER = 2; private java.util.List descriptors_; /** *
   * All rate limit requests must specify at least one RateLimitDescriptor. Each descriptor is
   * processed by the service (see below). If any of the descriptors are over limit, the entire
   * request is considered to be over limit.
   * 
* * repeated .envoy.api.v3alpha.ratelimit.RateLimitDescriptor descriptors = 2; */ public java.util.List getDescriptorsList() { return descriptors_; } /** *
   * All rate limit requests must specify at least one RateLimitDescriptor. Each descriptor is
   * processed by the service (see below). If any of the descriptors are over limit, the entire
   * request is considered to be over limit.
   * 
* * repeated .envoy.api.v3alpha.ratelimit.RateLimitDescriptor descriptors = 2; */ public java.util.List getDescriptorsOrBuilderList() { return descriptors_; } /** *
   * All rate limit requests must specify at least one RateLimitDescriptor. Each descriptor is
   * processed by the service (see below). If any of the descriptors are over limit, the entire
   * request is considered to be over limit.
   * 
* * repeated .envoy.api.v3alpha.ratelimit.RateLimitDescriptor descriptors = 2; */ public int getDescriptorsCount() { return descriptors_.size(); } /** *
   * All rate limit requests must specify at least one RateLimitDescriptor. Each descriptor is
   * processed by the service (see below). If any of the descriptors are over limit, the entire
   * request is considered to be over limit.
   * 
* * repeated .envoy.api.v3alpha.ratelimit.RateLimitDescriptor descriptors = 2; */ public io.envoyproxy.envoy.api.v3alpha.ratelimit.RateLimitDescriptor getDescriptors(int index) { return descriptors_.get(index); } /** *
   * All rate limit requests must specify at least one RateLimitDescriptor. Each descriptor is
   * processed by the service (see below). If any of the descriptors are over limit, the entire
   * request is considered to be over limit.
   * 
* * repeated .envoy.api.v3alpha.ratelimit.RateLimitDescriptor descriptors = 2; */ public io.envoyproxy.envoy.api.v3alpha.ratelimit.RateLimitDescriptorOrBuilder getDescriptorsOrBuilder( int index) { return descriptors_.get(index); } public static final int HITS_ADDEND_FIELD_NUMBER = 3; private int hitsAddend_; /** *
   * Rate limit requests can optionally specify the number of hits a request adds to the matched
   * limit. If the value is not set in the message, a request increases the matched limit by 1.
   * 
* * uint32 hits_addend = 3; */ public int getHitsAddend() { return hitsAddend_; } 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 (!getDomainBytes().isEmpty()) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, domain_); } for (int i = 0; i < descriptors_.size(); i++) { output.writeMessage(2, descriptors_.get(i)); } if (hitsAddend_ != 0) { output.writeUInt32(3, hitsAddend_); } unknownFields.writeTo(output); } @java.lang.Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; if (!getDomainBytes().isEmpty()) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, domain_); } for (int i = 0; i < descriptors_.size(); i++) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(2, descriptors_.get(i)); } if (hitsAddend_ != 0) { size += com.google.protobuf.CodedOutputStream .computeUInt32Size(3, hitsAddend_); } 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.v3alpha.RateLimitRequest)) { return super.equals(obj); } io.envoyproxy.envoy.service.ratelimit.v3alpha.RateLimitRequest other = (io.envoyproxy.envoy.service.ratelimit.v3alpha.RateLimitRequest) obj; if (!getDomain() .equals(other.getDomain())) return false; if (!getDescriptorsList() .equals(other.getDescriptorsList())) return false; if (getHitsAddend() != other.getHitsAddend()) 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) + DOMAIN_FIELD_NUMBER; hash = (53 * hash) + getDomain().hashCode(); if (getDescriptorsCount() > 0) { hash = (37 * hash) + DESCRIPTORS_FIELD_NUMBER; hash = (53 * hash) + getDescriptorsList().hashCode(); } hash = (37 * hash) + HITS_ADDEND_FIELD_NUMBER; hash = (53 * hash) + getHitsAddend(); hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; } public static io.envoyproxy.envoy.service.ratelimit.v3alpha.RateLimitRequest parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static io.envoyproxy.envoy.service.ratelimit.v3alpha.RateLimitRequest 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.v3alpha.RateLimitRequest parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static io.envoyproxy.envoy.service.ratelimit.v3alpha.RateLimitRequest 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.v3alpha.RateLimitRequest parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static io.envoyproxy.envoy.service.ratelimit.v3alpha.RateLimitRequest 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.v3alpha.RateLimitRequest parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static io.envoyproxy.envoy.service.ratelimit.v3alpha.RateLimitRequest 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.v3alpha.RateLimitRequest parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } public static io.envoyproxy.envoy.service.ratelimit.v3alpha.RateLimitRequest 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.v3alpha.RateLimitRequest 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.v3alpha.RateLimitRequest 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.v3alpha.RateLimitRequest 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; } /** *
   * Main message for a rate limit request. The rate limit service is designed to be fully generic
   * in the sense that it can operate on arbitrary hierarchical key/value pairs. The loaded
   * configuration will parse the request and find the most specific limit to apply. In addition,
   * a RateLimitRequest can contain multiple "descriptors" to limit on. When multiple descriptors
   * are provided, the server will limit on *ALL* of them and return an OVER_LIMIT response if any
   * of them are over limit. This enables more complex application level rate limiting scenarios
   * if desired.
   * 
* * Protobuf type {@code envoy.service.ratelimit.v3alpha.RateLimitRequest} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:envoy.service.ratelimit.v3alpha.RateLimitRequest) io.envoyproxy.envoy.service.ratelimit.v3alpha.RateLimitRequestOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return io.envoyproxy.envoy.service.ratelimit.v3alpha.RlsProto.internal_static_envoy_service_ratelimit_v3alpha_RateLimitRequest_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return io.envoyproxy.envoy.service.ratelimit.v3alpha.RlsProto.internal_static_envoy_service_ratelimit_v3alpha_RateLimitRequest_fieldAccessorTable .ensureFieldAccessorsInitialized( io.envoyproxy.envoy.service.ratelimit.v3alpha.RateLimitRequest.class, io.envoyproxy.envoy.service.ratelimit.v3alpha.RateLimitRequest.Builder.class); } // Construct using io.envoyproxy.envoy.service.ratelimit.v3alpha.RateLimitRequest.newBuilder() private Builder() { maybeForceBuilderInitialization(); } private Builder( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessageV3 .alwaysUseFieldBuilders) { getDescriptorsFieldBuilder(); } } @java.lang.Override public Builder clear() { super.clear(); domain_ = ""; if (descriptorsBuilder_ == null) { descriptors_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00000001); } else { descriptorsBuilder_.clear(); } hitsAddend_ = 0; return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return io.envoyproxy.envoy.service.ratelimit.v3alpha.RlsProto.internal_static_envoy_service_ratelimit_v3alpha_RateLimitRequest_descriptor; } @java.lang.Override public io.envoyproxy.envoy.service.ratelimit.v3alpha.RateLimitRequest getDefaultInstanceForType() { return io.envoyproxy.envoy.service.ratelimit.v3alpha.RateLimitRequest.getDefaultInstance(); } @java.lang.Override public io.envoyproxy.envoy.service.ratelimit.v3alpha.RateLimitRequest build() { io.envoyproxy.envoy.service.ratelimit.v3alpha.RateLimitRequest result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } @java.lang.Override public io.envoyproxy.envoy.service.ratelimit.v3alpha.RateLimitRequest buildPartial() { io.envoyproxy.envoy.service.ratelimit.v3alpha.RateLimitRequest result = new io.envoyproxy.envoy.service.ratelimit.v3alpha.RateLimitRequest(this); int from_bitField0_ = bitField0_; result.domain_ = domain_; if (descriptorsBuilder_ == null) { if (((bitField0_ & 0x00000001) != 0)) { descriptors_ = java.util.Collections.unmodifiableList(descriptors_); bitField0_ = (bitField0_ & ~0x00000001); } result.descriptors_ = descriptors_; } else { result.descriptors_ = descriptorsBuilder_.build(); } result.hitsAddend_ = hitsAddend_; 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.v3alpha.RateLimitRequest) { return mergeFrom((io.envoyproxy.envoy.service.ratelimit.v3alpha.RateLimitRequest)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(io.envoyproxy.envoy.service.ratelimit.v3alpha.RateLimitRequest other) { if (other == io.envoyproxy.envoy.service.ratelimit.v3alpha.RateLimitRequest.getDefaultInstance()) return this; if (!other.getDomain().isEmpty()) { domain_ = other.domain_; onChanged(); } if (descriptorsBuilder_ == null) { if (!other.descriptors_.isEmpty()) { if (descriptors_.isEmpty()) { descriptors_ = other.descriptors_; bitField0_ = (bitField0_ & ~0x00000001); } else { ensureDescriptorsIsMutable(); descriptors_.addAll(other.descriptors_); } onChanged(); } } else { if (!other.descriptors_.isEmpty()) { if (descriptorsBuilder_.isEmpty()) { descriptorsBuilder_.dispose(); descriptorsBuilder_ = null; descriptors_ = other.descriptors_; bitField0_ = (bitField0_ & ~0x00000001); descriptorsBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? getDescriptorsFieldBuilder() : null; } else { descriptorsBuilder_.addAllMessages(other.descriptors_); } } } if (other.getHitsAddend() != 0) { setHitsAddend(other.getHitsAddend()); } 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.v3alpha.RateLimitRequest parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = (io.envoyproxy.envoy.service.ratelimit.v3alpha.RateLimitRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { if (parsedMessage != null) { mergeFrom(parsedMessage); } } return this; } private int bitField0_; private java.lang.Object domain_ = ""; /** *
     * All rate limit requests must specify a domain. This enables the configuration to be per
     * application without fear of overlap. E.g., "envoy".
     * 
* * string domain = 1; */ public java.lang.String getDomain() { java.lang.Object ref = domain_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); domain_ = s; return s; } else { return (java.lang.String) ref; } } /** *
     * All rate limit requests must specify a domain. This enables the configuration to be per
     * application without fear of overlap. E.g., "envoy".
     * 
* * string domain = 1; */ public com.google.protobuf.ByteString getDomainBytes() { java.lang.Object ref = domain_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); domain_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** *
     * All rate limit requests must specify a domain. This enables the configuration to be per
     * application without fear of overlap. E.g., "envoy".
     * 
* * string domain = 1; */ public Builder setDomain( java.lang.String value) { if (value == null) { throw new NullPointerException(); } domain_ = value; onChanged(); return this; } /** *
     * All rate limit requests must specify a domain. This enables the configuration to be per
     * application without fear of overlap. E.g., "envoy".
     * 
* * string domain = 1; */ public Builder clearDomain() { domain_ = getDefaultInstance().getDomain(); onChanged(); return this; } /** *
     * All rate limit requests must specify a domain. This enables the configuration to be per
     * application without fear of overlap. E.g., "envoy".
     * 
* * string domain = 1; */ public Builder setDomainBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); domain_ = value; onChanged(); return this; } private java.util.List descriptors_ = java.util.Collections.emptyList(); private void ensureDescriptorsIsMutable() { if (!((bitField0_ & 0x00000001) != 0)) { descriptors_ = new java.util.ArrayList(descriptors_); bitField0_ |= 0x00000001; } } private com.google.protobuf.RepeatedFieldBuilderV3< io.envoyproxy.envoy.api.v3alpha.ratelimit.RateLimitDescriptor, io.envoyproxy.envoy.api.v3alpha.ratelimit.RateLimitDescriptor.Builder, io.envoyproxy.envoy.api.v3alpha.ratelimit.RateLimitDescriptorOrBuilder> descriptorsBuilder_; /** *
     * All rate limit requests must specify at least one RateLimitDescriptor. Each descriptor is
     * processed by the service (see below). If any of the descriptors are over limit, the entire
     * request is considered to be over limit.
     * 
* * repeated .envoy.api.v3alpha.ratelimit.RateLimitDescriptor descriptors = 2; */ public java.util.List getDescriptorsList() { if (descriptorsBuilder_ == null) { return java.util.Collections.unmodifiableList(descriptors_); } else { return descriptorsBuilder_.getMessageList(); } } /** *
     * All rate limit requests must specify at least one RateLimitDescriptor. Each descriptor is
     * processed by the service (see below). If any of the descriptors are over limit, the entire
     * request is considered to be over limit.
     * 
* * repeated .envoy.api.v3alpha.ratelimit.RateLimitDescriptor descriptors = 2; */ public int getDescriptorsCount() { if (descriptorsBuilder_ == null) { return descriptors_.size(); } else { return descriptorsBuilder_.getCount(); } } /** *
     * All rate limit requests must specify at least one RateLimitDescriptor. Each descriptor is
     * processed by the service (see below). If any of the descriptors are over limit, the entire
     * request is considered to be over limit.
     * 
* * repeated .envoy.api.v3alpha.ratelimit.RateLimitDescriptor descriptors = 2; */ public io.envoyproxy.envoy.api.v3alpha.ratelimit.RateLimitDescriptor getDescriptors(int index) { if (descriptorsBuilder_ == null) { return descriptors_.get(index); } else { return descriptorsBuilder_.getMessage(index); } } /** *
     * All rate limit requests must specify at least one RateLimitDescriptor. Each descriptor is
     * processed by the service (see below). If any of the descriptors are over limit, the entire
     * request is considered to be over limit.
     * 
* * repeated .envoy.api.v3alpha.ratelimit.RateLimitDescriptor descriptors = 2; */ public Builder setDescriptors( int index, io.envoyproxy.envoy.api.v3alpha.ratelimit.RateLimitDescriptor value) { if (descriptorsBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureDescriptorsIsMutable(); descriptors_.set(index, value); onChanged(); } else { descriptorsBuilder_.setMessage(index, value); } return this; } /** *
     * All rate limit requests must specify at least one RateLimitDescriptor. Each descriptor is
     * processed by the service (see below). If any of the descriptors are over limit, the entire
     * request is considered to be over limit.
     * 
* * repeated .envoy.api.v3alpha.ratelimit.RateLimitDescriptor descriptors = 2; */ public Builder setDescriptors( int index, io.envoyproxy.envoy.api.v3alpha.ratelimit.RateLimitDescriptor.Builder builderForValue) { if (descriptorsBuilder_ == null) { ensureDescriptorsIsMutable(); descriptors_.set(index, builderForValue.build()); onChanged(); } else { descriptorsBuilder_.setMessage(index, builderForValue.build()); } return this; } /** *
     * All rate limit requests must specify at least one RateLimitDescriptor. Each descriptor is
     * processed by the service (see below). If any of the descriptors are over limit, the entire
     * request is considered to be over limit.
     * 
* * repeated .envoy.api.v3alpha.ratelimit.RateLimitDescriptor descriptors = 2; */ public Builder addDescriptors(io.envoyproxy.envoy.api.v3alpha.ratelimit.RateLimitDescriptor value) { if (descriptorsBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureDescriptorsIsMutable(); descriptors_.add(value); onChanged(); } else { descriptorsBuilder_.addMessage(value); } return this; } /** *
     * All rate limit requests must specify at least one RateLimitDescriptor. Each descriptor is
     * processed by the service (see below). If any of the descriptors are over limit, the entire
     * request is considered to be over limit.
     * 
* * repeated .envoy.api.v3alpha.ratelimit.RateLimitDescriptor descriptors = 2; */ public Builder addDescriptors( int index, io.envoyproxy.envoy.api.v3alpha.ratelimit.RateLimitDescriptor value) { if (descriptorsBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureDescriptorsIsMutable(); descriptors_.add(index, value); onChanged(); } else { descriptorsBuilder_.addMessage(index, value); } return this; } /** *
     * All rate limit requests must specify at least one RateLimitDescriptor. Each descriptor is
     * processed by the service (see below). If any of the descriptors are over limit, the entire
     * request is considered to be over limit.
     * 
* * repeated .envoy.api.v3alpha.ratelimit.RateLimitDescriptor descriptors = 2; */ public Builder addDescriptors( io.envoyproxy.envoy.api.v3alpha.ratelimit.RateLimitDescriptor.Builder builderForValue) { if (descriptorsBuilder_ == null) { ensureDescriptorsIsMutable(); descriptors_.add(builderForValue.build()); onChanged(); } else { descriptorsBuilder_.addMessage(builderForValue.build()); } return this; } /** *
     * All rate limit requests must specify at least one RateLimitDescriptor. Each descriptor is
     * processed by the service (see below). If any of the descriptors are over limit, the entire
     * request is considered to be over limit.
     * 
* * repeated .envoy.api.v3alpha.ratelimit.RateLimitDescriptor descriptors = 2; */ public Builder addDescriptors( int index, io.envoyproxy.envoy.api.v3alpha.ratelimit.RateLimitDescriptor.Builder builderForValue) { if (descriptorsBuilder_ == null) { ensureDescriptorsIsMutable(); descriptors_.add(index, builderForValue.build()); onChanged(); } else { descriptorsBuilder_.addMessage(index, builderForValue.build()); } return this; } /** *
     * All rate limit requests must specify at least one RateLimitDescriptor. Each descriptor is
     * processed by the service (see below). If any of the descriptors are over limit, the entire
     * request is considered to be over limit.
     * 
* * repeated .envoy.api.v3alpha.ratelimit.RateLimitDescriptor descriptors = 2; */ public Builder addAllDescriptors( java.lang.Iterable values) { if (descriptorsBuilder_ == null) { ensureDescriptorsIsMutable(); com.google.protobuf.AbstractMessageLite.Builder.addAll( values, descriptors_); onChanged(); } else { descriptorsBuilder_.addAllMessages(values); } return this; } /** *
     * All rate limit requests must specify at least one RateLimitDescriptor. Each descriptor is
     * processed by the service (see below). If any of the descriptors are over limit, the entire
     * request is considered to be over limit.
     * 
* * repeated .envoy.api.v3alpha.ratelimit.RateLimitDescriptor descriptors = 2; */ public Builder clearDescriptors() { if (descriptorsBuilder_ == null) { descriptors_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00000001); onChanged(); } else { descriptorsBuilder_.clear(); } return this; } /** *
     * All rate limit requests must specify at least one RateLimitDescriptor. Each descriptor is
     * processed by the service (see below). If any of the descriptors are over limit, the entire
     * request is considered to be over limit.
     * 
* * repeated .envoy.api.v3alpha.ratelimit.RateLimitDescriptor descriptors = 2; */ public Builder removeDescriptors(int index) { if (descriptorsBuilder_ == null) { ensureDescriptorsIsMutable(); descriptors_.remove(index); onChanged(); } else { descriptorsBuilder_.remove(index); } return this; } /** *
     * All rate limit requests must specify at least one RateLimitDescriptor. Each descriptor is
     * processed by the service (see below). If any of the descriptors are over limit, the entire
     * request is considered to be over limit.
     * 
* * repeated .envoy.api.v3alpha.ratelimit.RateLimitDescriptor descriptors = 2; */ public io.envoyproxy.envoy.api.v3alpha.ratelimit.RateLimitDescriptor.Builder getDescriptorsBuilder( int index) { return getDescriptorsFieldBuilder().getBuilder(index); } /** *
     * All rate limit requests must specify at least one RateLimitDescriptor. Each descriptor is
     * processed by the service (see below). If any of the descriptors are over limit, the entire
     * request is considered to be over limit.
     * 
* * repeated .envoy.api.v3alpha.ratelimit.RateLimitDescriptor descriptors = 2; */ public io.envoyproxy.envoy.api.v3alpha.ratelimit.RateLimitDescriptorOrBuilder getDescriptorsOrBuilder( int index) { if (descriptorsBuilder_ == null) { return descriptors_.get(index); } else { return descriptorsBuilder_.getMessageOrBuilder(index); } } /** *
     * All rate limit requests must specify at least one RateLimitDescriptor. Each descriptor is
     * processed by the service (see below). If any of the descriptors are over limit, the entire
     * request is considered to be over limit.
     * 
* * repeated .envoy.api.v3alpha.ratelimit.RateLimitDescriptor descriptors = 2; */ public java.util.List getDescriptorsOrBuilderList() { if (descriptorsBuilder_ != null) { return descriptorsBuilder_.getMessageOrBuilderList(); } else { return java.util.Collections.unmodifiableList(descriptors_); } } /** *
     * All rate limit requests must specify at least one RateLimitDescriptor. Each descriptor is
     * processed by the service (see below). If any of the descriptors are over limit, the entire
     * request is considered to be over limit.
     * 
* * repeated .envoy.api.v3alpha.ratelimit.RateLimitDescriptor descriptors = 2; */ public io.envoyproxy.envoy.api.v3alpha.ratelimit.RateLimitDescriptor.Builder addDescriptorsBuilder() { return getDescriptorsFieldBuilder().addBuilder( io.envoyproxy.envoy.api.v3alpha.ratelimit.RateLimitDescriptor.getDefaultInstance()); } /** *
     * All rate limit requests must specify at least one RateLimitDescriptor. Each descriptor is
     * processed by the service (see below). If any of the descriptors are over limit, the entire
     * request is considered to be over limit.
     * 
* * repeated .envoy.api.v3alpha.ratelimit.RateLimitDescriptor descriptors = 2; */ public io.envoyproxy.envoy.api.v3alpha.ratelimit.RateLimitDescriptor.Builder addDescriptorsBuilder( int index) { return getDescriptorsFieldBuilder().addBuilder( index, io.envoyproxy.envoy.api.v3alpha.ratelimit.RateLimitDescriptor.getDefaultInstance()); } /** *
     * All rate limit requests must specify at least one RateLimitDescriptor. Each descriptor is
     * processed by the service (see below). If any of the descriptors are over limit, the entire
     * request is considered to be over limit.
     * 
* * repeated .envoy.api.v3alpha.ratelimit.RateLimitDescriptor descriptors = 2; */ public java.util.List getDescriptorsBuilderList() { return getDescriptorsFieldBuilder().getBuilderList(); } private com.google.protobuf.RepeatedFieldBuilderV3< io.envoyproxy.envoy.api.v3alpha.ratelimit.RateLimitDescriptor, io.envoyproxy.envoy.api.v3alpha.ratelimit.RateLimitDescriptor.Builder, io.envoyproxy.envoy.api.v3alpha.ratelimit.RateLimitDescriptorOrBuilder> getDescriptorsFieldBuilder() { if (descriptorsBuilder_ == null) { descriptorsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< io.envoyproxy.envoy.api.v3alpha.ratelimit.RateLimitDescriptor, io.envoyproxy.envoy.api.v3alpha.ratelimit.RateLimitDescriptor.Builder, io.envoyproxy.envoy.api.v3alpha.ratelimit.RateLimitDescriptorOrBuilder>( descriptors_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); descriptors_ = null; } return descriptorsBuilder_; } private int hitsAddend_ ; /** *
     * Rate limit requests can optionally specify the number of hits a request adds to the matched
     * limit. If the value is not set in the message, a request increases the matched limit by 1.
     * 
* * uint32 hits_addend = 3; */ public int getHitsAddend() { return hitsAddend_; } /** *
     * Rate limit requests can optionally specify the number of hits a request adds to the matched
     * limit. If the value is not set in the message, a request increases the matched limit by 1.
     * 
* * uint32 hits_addend = 3; */ public Builder setHitsAddend(int value) { hitsAddend_ = value; onChanged(); return this; } /** *
     * Rate limit requests can optionally specify the number of hits a request adds to the matched
     * limit. If the value is not set in the message, a request increases the matched limit by 1.
     * 
* * uint32 hits_addend = 3; */ public Builder clearHitsAddend() { hitsAddend_ = 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.v3alpha.RateLimitRequest) } // @@protoc_insertion_point(class_scope:envoy.service.ratelimit.v3alpha.RateLimitRequest) private static final io.envoyproxy.envoy.service.ratelimit.v3alpha.RateLimitRequest DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new io.envoyproxy.envoy.service.ratelimit.v3alpha.RateLimitRequest(); } public static io.envoyproxy.envoy.service.ratelimit.v3alpha.RateLimitRequest getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { @java.lang.Override public RateLimitRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return new RateLimitRequest(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.v3alpha.RateLimitRequest getDefaultInstanceForType() { return DEFAULT_INSTANCE; } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy