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/config/common/matcher/v3/matcher.proto
package io.envoyproxy.envoy.config.common.matcher.v3;
/**
*
* HTTP generic body match configuration.
* List of text strings and hex strings to be located in HTTP body.
* All specified strings must be found in the HTTP body for positive match.
* The search may be limited to specified number of bytes from the body start.
* .. attention::
* Searching for patterns in HTTP body is potentially cpu intensive. For each specified pattern, http body is scanned byte by byte to find a match.
* If multiple patterns are specified, the process is repeated for each pattern. If location of a pattern is known, ``bytes_limit`` should be specified
* to scan only part of the http body.
*
*
* Protobuf type {@code envoy.config.common.matcher.v3.HttpGenericBodyMatch}
*/
public final class HttpGenericBodyMatch extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:envoy.config.common.matcher.v3.HttpGenericBodyMatch)
HttpGenericBodyMatchOrBuilder {
private static final long serialVersionUID = 0L;
// Use HttpGenericBodyMatch.newBuilder() to construct.
private HttpGenericBodyMatch(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private HttpGenericBodyMatch() {
patterns_ = java.util.Collections.emptyList();
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new HttpGenericBodyMatch();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private HttpGenericBodyMatch(
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: {
bytesLimit_ = input.readUInt32();
break;
}
case 18: {
if (!((mutable_bitField0_ & 0x00000001) != 0)) {
patterns_ = new java.util.ArrayList();
mutable_bitField0_ |= 0x00000001;
}
patterns_.add(
input.readMessage(io.envoyproxy.envoy.config.common.matcher.v3.HttpGenericBodyMatch.GenericTextMatch.parser(), extensionRegistry));
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)) {
patterns_ = java.util.Collections.unmodifiableList(patterns_);
}
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return io.envoyproxy.envoy.config.common.matcher.v3.MatcherProto.internal_static_envoy_config_common_matcher_v3_HttpGenericBodyMatch_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return io.envoyproxy.envoy.config.common.matcher.v3.MatcherProto.internal_static_envoy_config_common_matcher_v3_HttpGenericBodyMatch_fieldAccessorTable
.ensureFieldAccessorsInitialized(
io.envoyproxy.envoy.config.common.matcher.v3.HttpGenericBodyMatch.class, io.envoyproxy.envoy.config.common.matcher.v3.HttpGenericBodyMatch.Builder.class);
}
public interface GenericTextMatchOrBuilder extends
// @@protoc_insertion_point(interface_extends:envoy.config.common.matcher.v3.HttpGenericBodyMatch.GenericTextMatch)
com.google.protobuf.MessageOrBuilder {
/**
*
* Text string to be located in HTTP body.
*
*
* string string_match = 1 [(.validate.rules) = { ... }
* @return Whether the stringMatch field is set.
*/
boolean hasStringMatch();
/**
*
*
* repeated .envoy.config.common.matcher.v3.HttpGenericBodyMatch.GenericTextMatch patterns = 2 [(.validate.rules) = { ... }
*/
@java.lang.Override
public io.envoyproxy.envoy.config.common.matcher.v3.HttpGenericBodyMatch.GenericTextMatchOrBuilder getPatternsOrBuilder(
int index) {
return patterns_.get(index);
}
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 (bytesLimit_ != 0) {
output.writeUInt32(1, bytesLimit_);
}
for (int i = 0; i < patterns_.size(); i++) {
output.writeMessage(2, patterns_.get(i));
}
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (bytesLimit_ != 0) {
size += com.google.protobuf.CodedOutputStream
.computeUInt32Size(1, bytesLimit_);
}
for (int i = 0; i < patterns_.size(); i++) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(2, patterns_.get(i));
}
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.config.common.matcher.v3.HttpGenericBodyMatch)) {
return super.equals(obj);
}
io.envoyproxy.envoy.config.common.matcher.v3.HttpGenericBodyMatch other = (io.envoyproxy.envoy.config.common.matcher.v3.HttpGenericBodyMatch) obj;
if (getBytesLimit()
!= other.getBytesLimit()) return false;
if (!getPatternsList()
.equals(other.getPatternsList())) 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) + BYTES_LIMIT_FIELD_NUMBER;
hash = (53 * hash) + getBytesLimit();
if (getPatternsCount() > 0) {
hash = (37 * hash) + PATTERNS_FIELD_NUMBER;
hash = (53 * hash) + getPatternsList().hashCode();
}
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static io.envoyproxy.envoy.config.common.matcher.v3.HttpGenericBodyMatch parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.envoyproxy.envoy.config.common.matcher.v3.HttpGenericBodyMatch 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.config.common.matcher.v3.HttpGenericBodyMatch parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.envoyproxy.envoy.config.common.matcher.v3.HttpGenericBodyMatch 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.config.common.matcher.v3.HttpGenericBodyMatch parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.envoyproxy.envoy.config.common.matcher.v3.HttpGenericBodyMatch parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static io.envoyproxy.envoy.config.common.matcher.v3.HttpGenericBodyMatch parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static io.envoyproxy.envoy.config.common.matcher.v3.HttpGenericBodyMatch 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.config.common.matcher.v3.HttpGenericBodyMatch parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static io.envoyproxy.envoy.config.common.matcher.v3.HttpGenericBodyMatch 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.config.common.matcher.v3.HttpGenericBodyMatch parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static io.envoyproxy.envoy.config.common.matcher.v3.HttpGenericBodyMatch 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.config.common.matcher.v3.HttpGenericBodyMatch 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;
}
/**
*
* HTTP generic body match configuration.
* List of text strings and hex strings to be located in HTTP body.
* All specified strings must be found in the HTTP body for positive match.
* The search may be limited to specified number of bytes from the body start.
* .. attention::
* Searching for patterns in HTTP body is potentially cpu intensive. For each specified pattern, http body is scanned byte by byte to find a match.
* If multiple patterns are specified, the process is repeated for each pattern. If location of a pattern is known, ``bytes_limit`` should be specified
* to scan only part of the http body.
*
*
* Protobuf type {@code envoy.config.common.matcher.v3.HttpGenericBodyMatch}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:envoy.config.common.matcher.v3.HttpGenericBodyMatch)
io.envoyproxy.envoy.config.common.matcher.v3.HttpGenericBodyMatchOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return io.envoyproxy.envoy.config.common.matcher.v3.MatcherProto.internal_static_envoy_config_common_matcher_v3_HttpGenericBodyMatch_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return io.envoyproxy.envoy.config.common.matcher.v3.MatcherProto.internal_static_envoy_config_common_matcher_v3_HttpGenericBodyMatch_fieldAccessorTable
.ensureFieldAccessorsInitialized(
io.envoyproxy.envoy.config.common.matcher.v3.HttpGenericBodyMatch.class, io.envoyproxy.envoy.config.common.matcher.v3.HttpGenericBodyMatch.Builder.class);
}
// Construct using io.envoyproxy.envoy.config.common.matcher.v3.HttpGenericBodyMatch.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
getPatternsFieldBuilder();
}
}
@java.lang.Override
public Builder clear() {
super.clear();
bytesLimit_ = 0;
if (patternsBuilder_ == null) {
patterns_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000001);
} else {
patternsBuilder_.clear();
}
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return io.envoyproxy.envoy.config.common.matcher.v3.MatcherProto.internal_static_envoy_config_common_matcher_v3_HttpGenericBodyMatch_descriptor;
}
@java.lang.Override
public io.envoyproxy.envoy.config.common.matcher.v3.HttpGenericBodyMatch getDefaultInstanceForType() {
return io.envoyproxy.envoy.config.common.matcher.v3.HttpGenericBodyMatch.getDefaultInstance();
}
@java.lang.Override
public io.envoyproxy.envoy.config.common.matcher.v3.HttpGenericBodyMatch build() {
io.envoyproxy.envoy.config.common.matcher.v3.HttpGenericBodyMatch result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public io.envoyproxy.envoy.config.common.matcher.v3.HttpGenericBodyMatch buildPartial() {
io.envoyproxy.envoy.config.common.matcher.v3.HttpGenericBodyMatch result = new io.envoyproxy.envoy.config.common.matcher.v3.HttpGenericBodyMatch(this);
int from_bitField0_ = bitField0_;
result.bytesLimit_ = bytesLimit_;
if (patternsBuilder_ == null) {
if (((bitField0_ & 0x00000001) != 0)) {
patterns_ = java.util.Collections.unmodifiableList(patterns_);
bitField0_ = (bitField0_ & ~0x00000001);
}
result.patterns_ = patterns_;
} else {
result.patterns_ = patternsBuilder_.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.config.common.matcher.v3.HttpGenericBodyMatch) {
return mergeFrom((io.envoyproxy.envoy.config.common.matcher.v3.HttpGenericBodyMatch)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(io.envoyproxy.envoy.config.common.matcher.v3.HttpGenericBodyMatch other) {
if (other == io.envoyproxy.envoy.config.common.matcher.v3.HttpGenericBodyMatch.getDefaultInstance()) return this;
if (other.getBytesLimit() != 0) {
setBytesLimit(other.getBytesLimit());
}
if (patternsBuilder_ == null) {
if (!other.patterns_.isEmpty()) {
if (patterns_.isEmpty()) {
patterns_ = other.patterns_;
bitField0_ = (bitField0_ & ~0x00000001);
} else {
ensurePatternsIsMutable();
patterns_.addAll(other.patterns_);
}
onChanged();
}
} else {
if (!other.patterns_.isEmpty()) {
if (patternsBuilder_.isEmpty()) {
patternsBuilder_.dispose();
patternsBuilder_ = null;
patterns_ = other.patterns_;
bitField0_ = (bitField0_ & ~0x00000001);
patternsBuilder_ =
com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
getPatternsFieldBuilder() : null;
} else {
patternsBuilder_.addAllMessages(other.patterns_);
}
}
}
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.config.common.matcher.v3.HttpGenericBodyMatch parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (io.envoyproxy.envoy.config.common.matcher.v3.HttpGenericBodyMatch) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int bitField0_;
private int bytesLimit_ ;
/**
*
* Limits search to specified number of bytes - default zero (no limit - match entire captured buffer).
*
*
* uint32 bytes_limit = 1;
* @return The bytesLimit.
*/
@java.lang.Override
public int getBytesLimit() {
return bytesLimit_;
}
/**
*
* Limits search to specified number of bytes - default zero (no limit - match entire captured buffer).
*
*
* uint32 bytes_limit = 1;
* @param value The bytesLimit to set.
* @return This builder for chaining.
*/
public Builder setBytesLimit(int value) {
bytesLimit_ = value;
onChanged();
return this;
}
/**
*
* Limits search to specified number of bytes - default zero (no limit - match entire captured buffer).
*