![JAR search and dependency download from the Maven repository](/logo.png)
io.envoyproxy.envoy.config.tap.v3.HttpGenericBodyMatch Maven / Gradle / Ivy
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: envoy/config/tap/v3/common.proto
package io.envoyproxy.envoy.config.tap.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.tap.v3.HttpGenericBodyMatch}
*/
public final class HttpGenericBodyMatch extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:envoy.config.tap.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.tap.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.tap.v3.CommonProto.internal_static_envoy_config_tap_v3_HttpGenericBodyMatch_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return io.envoyproxy.envoy.config.tap.v3.CommonProto.internal_static_envoy_config_tap_v3_HttpGenericBodyMatch_fieldAccessorTable
.ensureFieldAccessorsInitialized(
io.envoyproxy.envoy.config.tap.v3.HttpGenericBodyMatch.class, io.envoyproxy.envoy.config.tap.v3.HttpGenericBodyMatch.Builder.class);
}
public interface GenericTextMatchOrBuilder extends
// @@protoc_insertion_point(interface_extends:envoy.config.tap.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();
/**
*
* Text string to be located in HTTP body.
*
*
* string string_match = 1 [(.validate.rules) = { ... }
* @return The stringMatch.
*/
java.lang.String getStringMatch();
/**
*
* Text string to be located in HTTP body.
*
*
* string string_match = 1 [(.validate.rules) = { ... }
* @return The bytes for stringMatch.
*/
com.google.protobuf.ByteString
getStringMatchBytes();
/**
*
* Sequence of bytes to be located in HTTP body.
*
*
* bytes binary_match = 2 [(.validate.rules) = { ... }
* @return Whether the binaryMatch field is set.
*/
boolean hasBinaryMatch();
/**
*
* Sequence of bytes to be located in HTTP body.
*
*
* bytes binary_match = 2 [(.validate.rules) = { ... }
* @return The binaryMatch.
*/
com.google.protobuf.ByteString getBinaryMatch();
public io.envoyproxy.envoy.config.tap.v3.HttpGenericBodyMatch.GenericTextMatch.RuleCase getRuleCase();
}
/**
* Protobuf type {@code envoy.config.tap.v3.HttpGenericBodyMatch.GenericTextMatch}
*/
public static final class GenericTextMatch extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:envoy.config.tap.v3.HttpGenericBodyMatch.GenericTextMatch)
GenericTextMatchOrBuilder {
private static final long serialVersionUID = 0L;
// Use GenericTextMatch.newBuilder() to construct.
private GenericTextMatch(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private GenericTextMatch() {
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new GenericTextMatch();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private GenericTextMatch(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
com.google.protobuf.UnknownFieldSet.Builder unknownFields =
com.google.protobuf.UnknownFieldSet.newBuilder();
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 10: {
java.lang.String s = input.readStringRequireUtf8();
ruleCase_ = 1;
rule_ = s;
break;
}
case 18: {
rule_ = input.readBytes();
ruleCase_ = 2;
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.config.tap.v3.CommonProto.internal_static_envoy_config_tap_v3_HttpGenericBodyMatch_GenericTextMatch_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return io.envoyproxy.envoy.config.tap.v3.CommonProto.internal_static_envoy_config_tap_v3_HttpGenericBodyMatch_GenericTextMatch_fieldAccessorTable
.ensureFieldAccessorsInitialized(
io.envoyproxy.envoy.config.tap.v3.HttpGenericBodyMatch.GenericTextMatch.class, io.envoyproxy.envoy.config.tap.v3.HttpGenericBodyMatch.GenericTextMatch.Builder.class);
}
private int ruleCase_ = 0;
private java.lang.Object rule_;
public enum RuleCase
implements com.google.protobuf.Internal.EnumLite,
com.google.protobuf.AbstractMessage.InternalOneOfEnum {
STRING_MATCH(1),
BINARY_MATCH(2),
RULE_NOT_SET(0);
private final int value;
private RuleCase(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 RuleCase valueOf(int value) {
return forNumber(value);
}
public static RuleCase forNumber(int value) {
switch (value) {
case 1: return STRING_MATCH;
case 2: return BINARY_MATCH;
case 0: return RULE_NOT_SET;
default: return null;
}
}
public int getNumber() {
return this.value;
}
};
public RuleCase
getRuleCase() {
return RuleCase.forNumber(
ruleCase_);
}
public static final int STRING_MATCH_FIELD_NUMBER = 1;
/**
*
* Text string to be located in HTTP body.
*
*
* string string_match = 1 [(.validate.rules) = { ... }
* @return Whether the stringMatch field is set.
*/
public boolean hasStringMatch() {
return ruleCase_ == 1;
}
/**
*
* Text string to be located in HTTP body.
*
*
* string string_match = 1 [(.validate.rules) = { ... }
* @return The stringMatch.
*/
public java.lang.String getStringMatch() {
java.lang.Object ref = "";
if (ruleCase_ == 1) {
ref = rule_;
}
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();
if (ruleCase_ == 1) {
rule_ = s;
}
return s;
}
}
/**
*
* Text string to be located in HTTP body.
*
*
* string string_match = 1 [(.validate.rules) = { ... }
* @return The bytes for stringMatch.
*/
public com.google.protobuf.ByteString
getStringMatchBytes() {
java.lang.Object ref = "";
if (ruleCase_ == 1) {
ref = rule_;
}
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
if (ruleCase_ == 1) {
rule_ = b;
}
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int BINARY_MATCH_FIELD_NUMBER = 2;
/**
*
* Sequence of bytes to be located in HTTP body.
*
*
* bytes binary_match = 2 [(.validate.rules) = { ... }
* @return Whether the binaryMatch field is set.
*/
@java.lang.Override
public boolean hasBinaryMatch() {
return ruleCase_ == 2;
}
/**
*
* Sequence of bytes to be located in HTTP body.
*
*
* bytes binary_match = 2 [(.validate.rules) = { ... }
* @return The binaryMatch.
*/
@java.lang.Override
public com.google.protobuf.ByteString getBinaryMatch() {
if (ruleCase_ == 2) {
return (com.google.protobuf.ByteString) rule_;
}
return com.google.protobuf.ByteString.EMPTY;
}
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 (ruleCase_ == 1) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, rule_);
}
if (ruleCase_ == 2) {
output.writeBytes(
2, (com.google.protobuf.ByteString) rule_);
}
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (ruleCase_ == 1) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, rule_);
}
if (ruleCase_ == 2) {
size += com.google.protobuf.CodedOutputStream
.computeBytesSize(
2, (com.google.protobuf.ByteString) rule_);
}
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.tap.v3.HttpGenericBodyMatch.GenericTextMatch)) {
return super.equals(obj);
}
io.envoyproxy.envoy.config.tap.v3.HttpGenericBodyMatch.GenericTextMatch other = (io.envoyproxy.envoy.config.tap.v3.HttpGenericBodyMatch.GenericTextMatch) obj;
if (!getRuleCase().equals(other.getRuleCase())) return false;
switch (ruleCase_) {
case 1:
if (!getStringMatch()
.equals(other.getStringMatch())) return false;
break;
case 2:
if (!getBinaryMatch()
.equals(other.getBinaryMatch())) 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();
switch (ruleCase_) {
case 1:
hash = (37 * hash) + STRING_MATCH_FIELD_NUMBER;
hash = (53 * hash) + getStringMatch().hashCode();
break;
case 2:
hash = (37 * hash) + BINARY_MATCH_FIELD_NUMBER;
hash = (53 * hash) + getBinaryMatch().hashCode();
break;
case 0:
default:
}
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static io.envoyproxy.envoy.config.tap.v3.HttpGenericBodyMatch.GenericTextMatch parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.envoyproxy.envoy.config.tap.v3.HttpGenericBodyMatch.GenericTextMatch 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.tap.v3.HttpGenericBodyMatch.GenericTextMatch parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.envoyproxy.envoy.config.tap.v3.HttpGenericBodyMatch.GenericTextMatch 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.tap.v3.HttpGenericBodyMatch.GenericTextMatch parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.envoyproxy.envoy.config.tap.v3.HttpGenericBodyMatch.GenericTextMatch parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static io.envoyproxy.envoy.config.tap.v3.HttpGenericBodyMatch.GenericTextMatch parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static io.envoyproxy.envoy.config.tap.v3.HttpGenericBodyMatch.GenericTextMatch 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.tap.v3.HttpGenericBodyMatch.GenericTextMatch parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static io.envoyproxy.envoy.config.tap.v3.HttpGenericBodyMatch.GenericTextMatch 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.tap.v3.HttpGenericBodyMatch.GenericTextMatch parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static io.envoyproxy.envoy.config.tap.v3.HttpGenericBodyMatch.GenericTextMatch 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.tap.v3.HttpGenericBodyMatch.GenericTextMatch prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
@java.lang.Override
public Builder toBuilder() {
return this == DEFAULT_INSTANCE
? new Builder() : new Builder().mergeFrom(this);
}
@java.lang.Override
protected Builder newBuilderForType(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
* Protobuf type {@code envoy.config.tap.v3.HttpGenericBodyMatch.GenericTextMatch}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:envoy.config.tap.v3.HttpGenericBodyMatch.GenericTextMatch)
io.envoyproxy.envoy.config.tap.v3.HttpGenericBodyMatch.GenericTextMatchOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return io.envoyproxy.envoy.config.tap.v3.CommonProto.internal_static_envoy_config_tap_v3_HttpGenericBodyMatch_GenericTextMatch_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return io.envoyproxy.envoy.config.tap.v3.CommonProto.internal_static_envoy_config_tap_v3_HttpGenericBodyMatch_GenericTextMatch_fieldAccessorTable
.ensureFieldAccessorsInitialized(
io.envoyproxy.envoy.config.tap.v3.HttpGenericBodyMatch.GenericTextMatch.class, io.envoyproxy.envoy.config.tap.v3.HttpGenericBodyMatch.GenericTextMatch.Builder.class);
}
// Construct using io.envoyproxy.envoy.config.tap.v3.HttpGenericBodyMatch.GenericTextMatch.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();
ruleCase_ = 0;
rule_ = null;
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return io.envoyproxy.envoy.config.tap.v3.CommonProto.internal_static_envoy_config_tap_v3_HttpGenericBodyMatch_GenericTextMatch_descriptor;
}
@java.lang.Override
public io.envoyproxy.envoy.config.tap.v3.HttpGenericBodyMatch.GenericTextMatch getDefaultInstanceForType() {
return io.envoyproxy.envoy.config.tap.v3.HttpGenericBodyMatch.GenericTextMatch.getDefaultInstance();
}
@java.lang.Override
public io.envoyproxy.envoy.config.tap.v3.HttpGenericBodyMatch.GenericTextMatch build() {
io.envoyproxy.envoy.config.tap.v3.HttpGenericBodyMatch.GenericTextMatch result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public io.envoyproxy.envoy.config.tap.v3.HttpGenericBodyMatch.GenericTextMatch buildPartial() {
io.envoyproxy.envoy.config.tap.v3.HttpGenericBodyMatch.GenericTextMatch result = new io.envoyproxy.envoy.config.tap.v3.HttpGenericBodyMatch.GenericTextMatch(this);
if (ruleCase_ == 1) {
result.rule_ = rule_;
}
if (ruleCase_ == 2) {
result.rule_ = rule_;
}
result.ruleCase_ = ruleCase_;
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.tap.v3.HttpGenericBodyMatch.GenericTextMatch) {
return mergeFrom((io.envoyproxy.envoy.config.tap.v3.HttpGenericBodyMatch.GenericTextMatch)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(io.envoyproxy.envoy.config.tap.v3.HttpGenericBodyMatch.GenericTextMatch other) {
if (other == io.envoyproxy.envoy.config.tap.v3.HttpGenericBodyMatch.GenericTextMatch.getDefaultInstance()) return this;
switch (other.getRuleCase()) {
case STRING_MATCH: {
ruleCase_ = 1;
rule_ = other.rule_;
onChanged();
break;
}
case BINARY_MATCH: {
setBinaryMatch(other.getBinaryMatch());
break;
}
case RULE_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.config.tap.v3.HttpGenericBodyMatch.GenericTextMatch parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (io.envoyproxy.envoy.config.tap.v3.HttpGenericBodyMatch.GenericTextMatch) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int ruleCase_ = 0;
private java.lang.Object rule_;
public RuleCase
getRuleCase() {
return RuleCase.forNumber(
ruleCase_);
}
public Builder clearRule() {
ruleCase_ = 0;
rule_ = null;
onChanged();
return this;
}
/**
*
* Text string to be located in HTTP body.
*
*
* string string_match = 1 [(.validate.rules) = { ... }
* @return Whether the stringMatch field is set.
*/
@java.lang.Override
public boolean hasStringMatch() {
return ruleCase_ == 1;
}
/**
*
* Text string to be located in HTTP body.
*
*
* string string_match = 1 [(.validate.rules) = { ... }
* @return The stringMatch.
*/
@java.lang.Override
public java.lang.String getStringMatch() {
java.lang.Object ref = "";
if (ruleCase_ == 1) {
ref = rule_;
}
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
if (ruleCase_ == 1) {
rule_ = s;
}
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* Text string to be located in HTTP body.
*
*
* string string_match = 1 [(.validate.rules) = { ... }
* @return The bytes for stringMatch.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getStringMatchBytes() {
java.lang.Object ref = "";
if (ruleCase_ == 1) {
ref = rule_;
}
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
if (ruleCase_ == 1) {
rule_ = b;
}
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* Text string to be located in HTTP body.
*
*
* string string_match = 1 [(.validate.rules) = { ... }
* @param value The stringMatch to set.
* @return This builder for chaining.
*/
public Builder setStringMatch(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
ruleCase_ = 1;
rule_ = value;
onChanged();
return this;
}
/**
*
* Text string to be located in HTTP body.
*
*
* string string_match = 1 [(.validate.rules) = { ... }
* @return This builder for chaining.
*/
public Builder clearStringMatch() {
if (ruleCase_ == 1) {
ruleCase_ = 0;
rule_ = null;
onChanged();
}
return this;
}
/**
*
* Text string to be located in HTTP body.
*
*
* string string_match = 1 [(.validate.rules) = { ... }
* @param value The bytes for stringMatch to set.
* @return This builder for chaining.
*/
public Builder setStringMatchBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
ruleCase_ = 1;
rule_ = value;
onChanged();
return this;
}
/**
*
* Sequence of bytes to be located in HTTP body.
*
*
* bytes binary_match = 2 [(.validate.rules) = { ... }
* @return Whether the binaryMatch field is set.
*/
public boolean hasBinaryMatch() {
return ruleCase_ == 2;
}
/**
*
* Sequence of bytes to be located in HTTP body.
*
*
* bytes binary_match = 2 [(.validate.rules) = { ... }
* @return The binaryMatch.
*/
public com.google.protobuf.ByteString getBinaryMatch() {
if (ruleCase_ == 2) {
return (com.google.protobuf.ByteString) rule_;
}
return com.google.protobuf.ByteString.EMPTY;
}
/**
*
* Sequence of bytes to be located in HTTP body.
*
*
* bytes binary_match = 2 [(.validate.rules) = { ... }
* @param value The binaryMatch to set.
* @return This builder for chaining.
*/
public Builder setBinaryMatch(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
ruleCase_ = 2;
rule_ = value;
onChanged();
return this;
}
/**
*
* Sequence of bytes to be located in HTTP body.
*
*
* bytes binary_match = 2 [(.validate.rules) = { ... }
* @return This builder for chaining.
*/
public Builder clearBinaryMatch() {
if (ruleCase_ == 2) {
ruleCase_ = 0;
rule_ = null;
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.config.tap.v3.HttpGenericBodyMatch.GenericTextMatch)
}
// @@protoc_insertion_point(class_scope:envoy.config.tap.v3.HttpGenericBodyMatch.GenericTextMatch)
private static final io.envoyproxy.envoy.config.tap.v3.HttpGenericBodyMatch.GenericTextMatch DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new io.envoyproxy.envoy.config.tap.v3.HttpGenericBodyMatch.GenericTextMatch();
}
public static io.envoyproxy.envoy.config.tap.v3.HttpGenericBodyMatch.GenericTextMatch getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public GenericTextMatch parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new GenericTextMatch(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.config.tap.v3.HttpGenericBodyMatch.GenericTextMatch getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public static final int BYTES_LIMIT_FIELD_NUMBER = 1;
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_;
}
public static final int PATTERNS_FIELD_NUMBER = 2;
private java.util.List patterns_;
/**
*
* List of patterns to match.
*
*
* repeated .envoy.config.tap.v3.HttpGenericBodyMatch.GenericTextMatch patterns = 2 [(.validate.rules) = { ... }
*/
@java.lang.Override
public java.util.List getPatternsList() {
return patterns_;
}
/**
*
* List of patterns to match.
*
*
* repeated .envoy.config.tap.v3.HttpGenericBodyMatch.GenericTextMatch patterns = 2 [(.validate.rules) = { ... }
*/
@java.lang.Override
public java.util.List extends io.envoyproxy.envoy.config.tap.v3.HttpGenericBodyMatch.GenericTextMatchOrBuilder>
getPatternsOrBuilderList() {
return patterns_;
}
/**
*
* List of patterns to match.
*
*
* repeated .envoy.config.tap.v3.HttpGenericBodyMatch.GenericTextMatch patterns = 2 [(.validate.rules) = { ... }
*/
@java.lang.Override
public int getPatternsCount() {
return patterns_.size();
}
/**
*
* List of patterns to match.
*
*
* repeated .envoy.config.tap.v3.HttpGenericBodyMatch.GenericTextMatch patterns = 2 [(.validate.rules) = { ... }
*/
@java.lang.Override
public io.envoyproxy.envoy.config.tap.v3.HttpGenericBodyMatch.GenericTextMatch getPatterns(int index) {
return patterns_.get(index);
}
/**
*
* List of patterns to match.
*
*
* repeated .envoy.config.tap.v3.HttpGenericBodyMatch.GenericTextMatch patterns = 2 [(.validate.rules) = { ... }
*/
@java.lang.Override
public io.envoyproxy.envoy.config.tap.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.tap.v3.HttpGenericBodyMatch)) {
return super.equals(obj);
}
io.envoyproxy.envoy.config.tap.v3.HttpGenericBodyMatch other = (io.envoyproxy.envoy.config.tap.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.tap.v3.HttpGenericBodyMatch parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.envoyproxy.envoy.config.tap.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.tap.v3.HttpGenericBodyMatch parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.envoyproxy.envoy.config.tap.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.tap.v3.HttpGenericBodyMatch parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.envoyproxy.envoy.config.tap.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.tap.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.tap.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.tap.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.tap.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.tap.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.tap.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.tap.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.tap.v3.HttpGenericBodyMatch}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:envoy.config.tap.v3.HttpGenericBodyMatch)
io.envoyproxy.envoy.config.tap.v3.HttpGenericBodyMatchOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return io.envoyproxy.envoy.config.tap.v3.CommonProto.internal_static_envoy_config_tap_v3_HttpGenericBodyMatch_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return io.envoyproxy.envoy.config.tap.v3.CommonProto.internal_static_envoy_config_tap_v3_HttpGenericBodyMatch_fieldAccessorTable
.ensureFieldAccessorsInitialized(
io.envoyproxy.envoy.config.tap.v3.HttpGenericBodyMatch.class, io.envoyproxy.envoy.config.tap.v3.HttpGenericBodyMatch.Builder.class);
}
// Construct using io.envoyproxy.envoy.config.tap.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.tap.v3.CommonProto.internal_static_envoy_config_tap_v3_HttpGenericBodyMatch_descriptor;
}
@java.lang.Override
public io.envoyproxy.envoy.config.tap.v3.HttpGenericBodyMatch getDefaultInstanceForType() {
return io.envoyproxy.envoy.config.tap.v3.HttpGenericBodyMatch.getDefaultInstance();
}
@java.lang.Override
public io.envoyproxy.envoy.config.tap.v3.HttpGenericBodyMatch build() {
io.envoyproxy.envoy.config.tap.v3.HttpGenericBodyMatch result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public io.envoyproxy.envoy.config.tap.v3.HttpGenericBodyMatch buildPartial() {
io.envoyproxy.envoy.config.tap.v3.HttpGenericBodyMatch result = new io.envoyproxy.envoy.config.tap.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.tap.v3.HttpGenericBodyMatch) {
return mergeFrom((io.envoyproxy.envoy.config.tap.v3.HttpGenericBodyMatch)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(io.envoyproxy.envoy.config.tap.v3.HttpGenericBodyMatch other) {
if (other == io.envoyproxy.envoy.config.tap.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.tap.v3.HttpGenericBodyMatch parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (io.envoyproxy.envoy.config.tap.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).
*
*
* uint32 bytes_limit = 1;
* @return This builder for chaining.
*/
public Builder clearBytesLimit() {
bytesLimit_ = 0;
onChanged();
return this;
}
private java.util.List patterns_ =
java.util.Collections.emptyList();
private void ensurePatternsIsMutable() {
if (!((bitField0_ & 0x00000001) != 0)) {
patterns_ = new java.util.ArrayList(patterns_);
bitField0_ |= 0x00000001;
}
}
private com.google.protobuf.RepeatedFieldBuilderV3<
io.envoyproxy.envoy.config.tap.v3.HttpGenericBodyMatch.GenericTextMatch, io.envoyproxy.envoy.config.tap.v3.HttpGenericBodyMatch.GenericTextMatch.Builder, io.envoyproxy.envoy.config.tap.v3.HttpGenericBodyMatch.GenericTextMatchOrBuilder> patternsBuilder_;
/**
*
* List of patterns to match.
*
*
* repeated .envoy.config.tap.v3.HttpGenericBodyMatch.GenericTextMatch patterns = 2 [(.validate.rules) = { ... }
*/
public java.util.List getPatternsList() {
if (patternsBuilder_ == null) {
return java.util.Collections.unmodifiableList(patterns_);
} else {
return patternsBuilder_.getMessageList();
}
}
/**
*
* List of patterns to match.
*
*
* repeated .envoy.config.tap.v3.HttpGenericBodyMatch.GenericTextMatch patterns = 2 [(.validate.rules) = { ... }
*/
public int getPatternsCount() {
if (patternsBuilder_ == null) {
return patterns_.size();
} else {
return patternsBuilder_.getCount();
}
}
/**
*
* List of patterns to match.
*
*
* repeated .envoy.config.tap.v3.HttpGenericBodyMatch.GenericTextMatch patterns = 2 [(.validate.rules) = { ... }
*/
public io.envoyproxy.envoy.config.tap.v3.HttpGenericBodyMatch.GenericTextMatch getPatterns(int index) {
if (patternsBuilder_ == null) {
return patterns_.get(index);
} else {
return patternsBuilder_.getMessage(index);
}
}
/**
*
* List of patterns to match.
*
*
* repeated .envoy.config.tap.v3.HttpGenericBodyMatch.GenericTextMatch patterns = 2 [(.validate.rules) = { ... }
*/
public Builder setPatterns(
int index, io.envoyproxy.envoy.config.tap.v3.HttpGenericBodyMatch.GenericTextMatch value) {
if (patternsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensurePatternsIsMutable();
patterns_.set(index, value);
onChanged();
} else {
patternsBuilder_.setMessage(index, value);
}
return this;
}
/**
*
* List of patterns to match.
*
*
* repeated .envoy.config.tap.v3.HttpGenericBodyMatch.GenericTextMatch patterns = 2 [(.validate.rules) = { ... }
*/
public Builder setPatterns(
int index, io.envoyproxy.envoy.config.tap.v3.HttpGenericBodyMatch.GenericTextMatch.Builder builderForValue) {
if (patternsBuilder_ == null) {
ensurePatternsIsMutable();
patterns_.set(index, builderForValue.build());
onChanged();
} else {
patternsBuilder_.setMessage(index, builderForValue.build());
}
return this;
}
/**
*
* List of patterns to match.
*
*
* repeated .envoy.config.tap.v3.HttpGenericBodyMatch.GenericTextMatch patterns = 2 [(.validate.rules) = { ... }
*/
public Builder addPatterns(io.envoyproxy.envoy.config.tap.v3.HttpGenericBodyMatch.GenericTextMatch value) {
if (patternsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensurePatternsIsMutable();
patterns_.add(value);
onChanged();
} else {
patternsBuilder_.addMessage(value);
}
return this;
}
/**
*
* List of patterns to match.
*
*
* repeated .envoy.config.tap.v3.HttpGenericBodyMatch.GenericTextMatch patterns = 2 [(.validate.rules) = { ... }
*/
public Builder addPatterns(
int index, io.envoyproxy.envoy.config.tap.v3.HttpGenericBodyMatch.GenericTextMatch value) {
if (patternsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensurePatternsIsMutable();
patterns_.add(index, value);
onChanged();
} else {
patternsBuilder_.addMessage(index, value);
}
return this;
}
/**
*
* List of patterns to match.
*
*
* repeated .envoy.config.tap.v3.HttpGenericBodyMatch.GenericTextMatch patterns = 2 [(.validate.rules) = { ... }
*/
public Builder addPatterns(
io.envoyproxy.envoy.config.tap.v3.HttpGenericBodyMatch.GenericTextMatch.Builder builderForValue) {
if (patternsBuilder_ == null) {
ensurePatternsIsMutable();
patterns_.add(builderForValue.build());
onChanged();
} else {
patternsBuilder_.addMessage(builderForValue.build());
}
return this;
}
/**
*
* List of patterns to match.
*
*
* repeated .envoy.config.tap.v3.HttpGenericBodyMatch.GenericTextMatch patterns = 2 [(.validate.rules) = { ... }
*/
public Builder addPatterns(
int index, io.envoyproxy.envoy.config.tap.v3.HttpGenericBodyMatch.GenericTextMatch.Builder builderForValue) {
if (patternsBuilder_ == null) {
ensurePatternsIsMutable();
patterns_.add(index, builderForValue.build());
onChanged();
} else {
patternsBuilder_.addMessage(index, builderForValue.build());
}
return this;
}
/**
*
* List of patterns to match.
*
*
* repeated .envoy.config.tap.v3.HttpGenericBodyMatch.GenericTextMatch patterns = 2 [(.validate.rules) = { ... }
*/
public Builder addAllPatterns(
java.lang.Iterable extends io.envoyproxy.envoy.config.tap.v3.HttpGenericBodyMatch.GenericTextMatch> values) {
if (patternsBuilder_ == null) {
ensurePatternsIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, patterns_);
onChanged();
} else {
patternsBuilder_.addAllMessages(values);
}
return this;
}
/**
*
* List of patterns to match.
*
*
* repeated .envoy.config.tap.v3.HttpGenericBodyMatch.GenericTextMatch patterns = 2 [(.validate.rules) = { ... }
*/
public Builder clearPatterns() {
if (patternsBuilder_ == null) {
patterns_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000001);
onChanged();
} else {
patternsBuilder_.clear();
}
return this;
}
/**
*
* List of patterns to match.
*
*
* repeated .envoy.config.tap.v3.HttpGenericBodyMatch.GenericTextMatch patterns = 2 [(.validate.rules) = { ... }
*/
public Builder removePatterns(int index) {
if (patternsBuilder_ == null) {
ensurePatternsIsMutable();
patterns_.remove(index);
onChanged();
} else {
patternsBuilder_.remove(index);
}
return this;
}
/**
*
* List of patterns to match.
*
*
* repeated .envoy.config.tap.v3.HttpGenericBodyMatch.GenericTextMatch patterns = 2 [(.validate.rules) = { ... }
*/
public io.envoyproxy.envoy.config.tap.v3.HttpGenericBodyMatch.GenericTextMatch.Builder getPatternsBuilder(
int index) {
return getPatternsFieldBuilder().getBuilder(index);
}
/**
*
* List of patterns to match.
*
*
* repeated .envoy.config.tap.v3.HttpGenericBodyMatch.GenericTextMatch patterns = 2 [(.validate.rules) = { ... }
*/
public io.envoyproxy.envoy.config.tap.v3.HttpGenericBodyMatch.GenericTextMatchOrBuilder getPatternsOrBuilder(
int index) {
if (patternsBuilder_ == null) {
return patterns_.get(index); } else {
return patternsBuilder_.getMessageOrBuilder(index);
}
}
/**
*
* List of patterns to match.
*
*
* repeated .envoy.config.tap.v3.HttpGenericBodyMatch.GenericTextMatch patterns = 2 [(.validate.rules) = { ... }
*/
public java.util.List extends io.envoyproxy.envoy.config.tap.v3.HttpGenericBodyMatch.GenericTextMatchOrBuilder>
getPatternsOrBuilderList() {
if (patternsBuilder_ != null) {
return patternsBuilder_.getMessageOrBuilderList();
} else {
return java.util.Collections.unmodifiableList(patterns_);
}
}
/**
*
* List of patterns to match.
*
*
* repeated .envoy.config.tap.v3.HttpGenericBodyMatch.GenericTextMatch patterns = 2 [(.validate.rules) = { ... }
*/
public io.envoyproxy.envoy.config.tap.v3.HttpGenericBodyMatch.GenericTextMatch.Builder addPatternsBuilder() {
return getPatternsFieldBuilder().addBuilder(
io.envoyproxy.envoy.config.tap.v3.HttpGenericBodyMatch.GenericTextMatch.getDefaultInstance());
}
/**
*
* List of patterns to match.
*
*
* repeated .envoy.config.tap.v3.HttpGenericBodyMatch.GenericTextMatch patterns = 2 [(.validate.rules) = { ... }
*/
public io.envoyproxy.envoy.config.tap.v3.HttpGenericBodyMatch.GenericTextMatch.Builder addPatternsBuilder(
int index) {
return getPatternsFieldBuilder().addBuilder(
index, io.envoyproxy.envoy.config.tap.v3.HttpGenericBodyMatch.GenericTextMatch.getDefaultInstance());
}
/**
*
* List of patterns to match.
*
*
* repeated .envoy.config.tap.v3.HttpGenericBodyMatch.GenericTextMatch patterns = 2 [(.validate.rules) = { ... }
*/
public java.util.List
getPatternsBuilderList() {
return getPatternsFieldBuilder().getBuilderList();
}
private com.google.protobuf.RepeatedFieldBuilderV3<
io.envoyproxy.envoy.config.tap.v3.HttpGenericBodyMatch.GenericTextMatch, io.envoyproxy.envoy.config.tap.v3.HttpGenericBodyMatch.GenericTextMatch.Builder, io.envoyproxy.envoy.config.tap.v3.HttpGenericBodyMatch.GenericTextMatchOrBuilder>
getPatternsFieldBuilder() {
if (patternsBuilder_ == null) {
patternsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
io.envoyproxy.envoy.config.tap.v3.HttpGenericBodyMatch.GenericTextMatch, io.envoyproxy.envoy.config.tap.v3.HttpGenericBodyMatch.GenericTextMatch.Builder, io.envoyproxy.envoy.config.tap.v3.HttpGenericBodyMatch.GenericTextMatchOrBuilder>(
patterns_,
((bitField0_ & 0x00000001) != 0),
getParentForChildren(),
isClean());
patterns_ = null;
}
return patternsBuilder_;
}
@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.config.tap.v3.HttpGenericBodyMatch)
}
// @@protoc_insertion_point(class_scope:envoy.config.tap.v3.HttpGenericBodyMatch)
private static final io.envoyproxy.envoy.config.tap.v3.HttpGenericBodyMatch DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new io.envoyproxy.envoy.config.tap.v3.HttpGenericBodyMatch();
}
public static io.envoyproxy.envoy.config.tap.v3.HttpGenericBodyMatch getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public HttpGenericBodyMatch parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new HttpGenericBodyMatch(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.config.tap.v3.HttpGenericBodyMatch getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy