
io.envoyproxy.envoy.config.rbac.v3.SourcedMetadata Maven / Gradle / Ivy
The newest version!
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: envoy/config/rbac/v3/rbac.proto
// Protobuf Java Version: 3.25.1
package io.envoyproxy.envoy.config.rbac.v3;
/**
*
* SourcedMetadata enables matching against metadata from different sources in the request processing
* pipeline. It extends the base MetadataMatcher functionality by allowing specification of where the
* metadata should be sourced from, rather than only matching against dynamic metadata.
*
* The matcher can be configured to look up metadata from:
*
* * Dynamic metadata: Runtime metadata added by filters during request processing
* * Route metadata: Static metadata configured on the route entry
*
*
* Protobuf type {@code envoy.config.rbac.v3.SourcedMetadata}
*/
public final class SourcedMetadata extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:envoy.config.rbac.v3.SourcedMetadata)
SourcedMetadataOrBuilder {
private static final long serialVersionUID = 0L;
// Use SourcedMetadata.newBuilder() to construct.
private SourcedMetadata(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private SourcedMetadata() {
metadataSource_ = 0;
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new SourcedMetadata();
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return io.envoyproxy.envoy.config.rbac.v3.RbacProto.internal_static_envoy_config_rbac_v3_SourcedMetadata_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return io.envoyproxy.envoy.config.rbac.v3.RbacProto.internal_static_envoy_config_rbac_v3_SourcedMetadata_fieldAccessorTable
.ensureFieldAccessorsInitialized(
io.envoyproxy.envoy.config.rbac.v3.SourcedMetadata.class, io.envoyproxy.envoy.config.rbac.v3.SourcedMetadata.Builder.class);
}
private int bitField0_;
public static final int METADATA_MATCHER_FIELD_NUMBER = 1;
private io.envoyproxy.envoy.type.matcher.v3.MetadataMatcher metadataMatcher_;
/**
*
* Metadata matcher configuration that defines what metadata to match against. This includes the filter name,
* metadata key path, and expected value.
*
*
* .envoy.type.matcher.v3.MetadataMatcher metadata_matcher = 1 [(.validate.rules) = { ... }
* @return Whether the metadataMatcher field is set.
*/
@java.lang.Override
public boolean hasMetadataMatcher() {
return ((bitField0_ & 0x00000001) != 0);
}
/**
*
* Metadata matcher configuration that defines what metadata to match against. This includes the filter name,
* metadata key path, and expected value.
*
*
* .envoy.type.matcher.v3.MetadataMatcher metadata_matcher = 1 [(.validate.rules) = { ... }
* @return The metadataMatcher.
*/
@java.lang.Override
public io.envoyproxy.envoy.type.matcher.v3.MetadataMatcher getMetadataMatcher() {
return metadataMatcher_ == null ? io.envoyproxy.envoy.type.matcher.v3.MetadataMatcher.getDefaultInstance() : metadataMatcher_;
}
/**
*
* Metadata matcher configuration that defines what metadata to match against. This includes the filter name,
* metadata key path, and expected value.
*
*
* .envoy.type.matcher.v3.MetadataMatcher metadata_matcher = 1 [(.validate.rules) = { ... }
*/
@java.lang.Override
public io.envoyproxy.envoy.type.matcher.v3.MetadataMatcherOrBuilder getMetadataMatcherOrBuilder() {
return metadataMatcher_ == null ? io.envoyproxy.envoy.type.matcher.v3.MetadataMatcher.getDefaultInstance() : metadataMatcher_;
}
public static final int METADATA_SOURCE_FIELD_NUMBER = 2;
private int metadataSource_ = 0;
/**
*
* Specifies which metadata source should be used for matching. If not set,
* defaults to DYNAMIC (dynamic metadata). Set to ROUTE to match against
* static metadata configured on the route entry.
*
*
* .envoy.config.rbac.v3.MetadataSource metadata_source = 2 [(.validate.rules) = { ... }
* @return The enum numeric value on the wire for metadataSource.
*/
@java.lang.Override public int getMetadataSourceValue() {
return metadataSource_;
}
/**
*
* Specifies which metadata source should be used for matching. If not set,
* defaults to DYNAMIC (dynamic metadata). Set to ROUTE to match against
* static metadata configured on the route entry.
*
*
* .envoy.config.rbac.v3.MetadataSource metadata_source = 2 [(.validate.rules) = { ... }
* @return The metadataSource.
*/
@java.lang.Override public io.envoyproxy.envoy.config.rbac.v3.MetadataSource getMetadataSource() {
io.envoyproxy.envoy.config.rbac.v3.MetadataSource result = io.envoyproxy.envoy.config.rbac.v3.MetadataSource.forNumber(metadataSource_);
return result == null ? io.envoyproxy.envoy.config.rbac.v3.MetadataSource.UNRECOGNIZED : result;
}
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
if (((bitField0_ & 0x00000001) != 0)) {
output.writeMessage(1, getMetadataMatcher());
}
if (metadataSource_ != io.envoyproxy.envoy.config.rbac.v3.MetadataSource.DYNAMIC.getNumber()) {
output.writeEnum(2, metadataSource_);
}
getUnknownFields().writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (((bitField0_ & 0x00000001) != 0)) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(1, getMetadataMatcher());
}
if (metadataSource_ != io.envoyproxy.envoy.config.rbac.v3.MetadataSource.DYNAMIC.getNumber()) {
size += com.google.protobuf.CodedOutputStream
.computeEnumSize(2, metadataSource_);
}
size += getUnknownFields().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.rbac.v3.SourcedMetadata)) {
return super.equals(obj);
}
io.envoyproxy.envoy.config.rbac.v3.SourcedMetadata other = (io.envoyproxy.envoy.config.rbac.v3.SourcedMetadata) obj;
if (hasMetadataMatcher() != other.hasMetadataMatcher()) return false;
if (hasMetadataMatcher()) {
if (!getMetadataMatcher()
.equals(other.getMetadataMatcher())) return false;
}
if (metadataSource_ != other.metadataSource_) return false;
if (!getUnknownFields().equals(other.getUnknownFields())) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
if (hasMetadataMatcher()) {
hash = (37 * hash) + METADATA_MATCHER_FIELD_NUMBER;
hash = (53 * hash) + getMetadataMatcher().hashCode();
}
hash = (37 * hash) + METADATA_SOURCE_FIELD_NUMBER;
hash = (53 * hash) + metadataSource_;
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static io.envoyproxy.envoy.config.rbac.v3.SourcedMetadata parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.envoyproxy.envoy.config.rbac.v3.SourcedMetadata 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.rbac.v3.SourcedMetadata parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.envoyproxy.envoy.config.rbac.v3.SourcedMetadata 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.rbac.v3.SourcedMetadata parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.envoyproxy.envoy.config.rbac.v3.SourcedMetadata parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static io.envoyproxy.envoy.config.rbac.v3.SourcedMetadata parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static io.envoyproxy.envoy.config.rbac.v3.SourcedMetadata 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.rbac.v3.SourcedMetadata parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static io.envoyproxy.envoy.config.rbac.v3.SourcedMetadata 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.rbac.v3.SourcedMetadata parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static io.envoyproxy.envoy.config.rbac.v3.SourcedMetadata 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.rbac.v3.SourcedMetadata 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;
}
/**
*
* SourcedMetadata enables matching against metadata from different sources in the request processing
* pipeline. It extends the base MetadataMatcher functionality by allowing specification of where the
* metadata should be sourced from, rather than only matching against dynamic metadata.
*
* The matcher can be configured to look up metadata from:
*
* * Dynamic metadata: Runtime metadata added by filters during request processing
* * Route metadata: Static metadata configured on the route entry
*
*
* Protobuf type {@code envoy.config.rbac.v3.SourcedMetadata}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:envoy.config.rbac.v3.SourcedMetadata)
io.envoyproxy.envoy.config.rbac.v3.SourcedMetadataOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return io.envoyproxy.envoy.config.rbac.v3.RbacProto.internal_static_envoy_config_rbac_v3_SourcedMetadata_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return io.envoyproxy.envoy.config.rbac.v3.RbacProto.internal_static_envoy_config_rbac_v3_SourcedMetadata_fieldAccessorTable
.ensureFieldAccessorsInitialized(
io.envoyproxy.envoy.config.rbac.v3.SourcedMetadata.class, io.envoyproxy.envoy.config.rbac.v3.SourcedMetadata.Builder.class);
}
// Construct using io.envoyproxy.envoy.config.rbac.v3.SourcedMetadata.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
getMetadataMatcherFieldBuilder();
}
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
metadataMatcher_ = null;
if (metadataMatcherBuilder_ != null) {
metadataMatcherBuilder_.dispose();
metadataMatcherBuilder_ = null;
}
metadataSource_ = 0;
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return io.envoyproxy.envoy.config.rbac.v3.RbacProto.internal_static_envoy_config_rbac_v3_SourcedMetadata_descriptor;
}
@java.lang.Override
public io.envoyproxy.envoy.config.rbac.v3.SourcedMetadata getDefaultInstanceForType() {
return io.envoyproxy.envoy.config.rbac.v3.SourcedMetadata.getDefaultInstance();
}
@java.lang.Override
public io.envoyproxy.envoy.config.rbac.v3.SourcedMetadata build() {
io.envoyproxy.envoy.config.rbac.v3.SourcedMetadata result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public io.envoyproxy.envoy.config.rbac.v3.SourcedMetadata buildPartial() {
io.envoyproxy.envoy.config.rbac.v3.SourcedMetadata result = new io.envoyproxy.envoy.config.rbac.v3.SourcedMetadata(this);
if (bitField0_ != 0) { buildPartial0(result); }
onBuilt();
return result;
}
private void buildPartial0(io.envoyproxy.envoy.config.rbac.v3.SourcedMetadata result) {
int from_bitField0_ = bitField0_;
int to_bitField0_ = 0;
if (((from_bitField0_ & 0x00000001) != 0)) {
result.metadataMatcher_ = metadataMatcherBuilder_ == null
? metadataMatcher_
: metadataMatcherBuilder_.build();
to_bitField0_ |= 0x00000001;
}
if (((from_bitField0_ & 0x00000002) != 0)) {
result.metadataSource_ = metadataSource_;
}
result.bitField0_ |= to_bitField0_;
}
@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.rbac.v3.SourcedMetadata) {
return mergeFrom((io.envoyproxy.envoy.config.rbac.v3.SourcedMetadata)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(io.envoyproxy.envoy.config.rbac.v3.SourcedMetadata other) {
if (other == io.envoyproxy.envoy.config.rbac.v3.SourcedMetadata.getDefaultInstance()) return this;
if (other.hasMetadataMatcher()) {
mergeMetadataMatcher(other.getMetadataMatcher());
}
if (other.metadataSource_ != 0) {
setMetadataSourceValue(other.getMetadataSourceValue());
}
this.mergeUnknownFields(other.getUnknownFields());
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 {
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 10: {
input.readMessage(
getMetadataMatcherFieldBuilder().getBuilder(),
extensionRegistry);
bitField0_ |= 0x00000001;
break;
} // case 10
case 16: {
metadataSource_ = input.readEnum();
bitField0_ |= 0x00000002;
break;
} // case 16
default: {
if (!super.parseUnknownField(input, extensionRegistry, tag)) {
done = true; // was an endgroup tag
}
break;
} // default:
} // switch (tag)
} // while (!done)
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.unwrapIOException();
} finally {
onChanged();
} // finally
return this;
}
private int bitField0_;
private io.envoyproxy.envoy.type.matcher.v3.MetadataMatcher metadataMatcher_;
private com.google.protobuf.SingleFieldBuilderV3<
io.envoyproxy.envoy.type.matcher.v3.MetadataMatcher, io.envoyproxy.envoy.type.matcher.v3.MetadataMatcher.Builder, io.envoyproxy.envoy.type.matcher.v3.MetadataMatcherOrBuilder> metadataMatcherBuilder_;
/**
*
* Metadata matcher configuration that defines what metadata to match against. This includes the filter name,
* metadata key path, and expected value.
*
*
* .envoy.type.matcher.v3.MetadataMatcher metadata_matcher = 1 [(.validate.rules) = { ... }
* @return Whether the metadataMatcher field is set.
*/
public boolean hasMetadataMatcher() {
return ((bitField0_ & 0x00000001) != 0);
}
/**
*
* Metadata matcher configuration that defines what metadata to match against. This includes the filter name,
* metadata key path, and expected value.
*
*
* .envoy.type.matcher.v3.MetadataMatcher metadata_matcher = 1 [(.validate.rules) = { ... }
* @return The metadataMatcher.
*/
public io.envoyproxy.envoy.type.matcher.v3.MetadataMatcher getMetadataMatcher() {
if (metadataMatcherBuilder_ == null) {
return metadataMatcher_ == null ? io.envoyproxy.envoy.type.matcher.v3.MetadataMatcher.getDefaultInstance() : metadataMatcher_;
} else {
return metadataMatcherBuilder_.getMessage();
}
}
/**
*
* Metadata matcher configuration that defines what metadata to match against. This includes the filter name,
* metadata key path, and expected value.
*
*
* .envoy.type.matcher.v3.MetadataMatcher metadata_matcher = 1 [(.validate.rules) = { ... }
*/
public Builder setMetadataMatcher(io.envoyproxy.envoy.type.matcher.v3.MetadataMatcher value) {
if (metadataMatcherBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
metadataMatcher_ = value;
} else {
metadataMatcherBuilder_.setMessage(value);
}
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
*
* Metadata matcher configuration that defines what metadata to match against. This includes the filter name,
* metadata key path, and expected value.
*
*
* .envoy.type.matcher.v3.MetadataMatcher metadata_matcher = 1 [(.validate.rules) = { ... }
*/
public Builder setMetadataMatcher(
io.envoyproxy.envoy.type.matcher.v3.MetadataMatcher.Builder builderForValue) {
if (metadataMatcherBuilder_ == null) {
metadataMatcher_ = builderForValue.build();
} else {
metadataMatcherBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
*
* Metadata matcher configuration that defines what metadata to match against. This includes the filter name,
* metadata key path, and expected value.
*
*
* .envoy.type.matcher.v3.MetadataMatcher metadata_matcher = 1 [(.validate.rules) = { ... }
*/
public Builder mergeMetadataMatcher(io.envoyproxy.envoy.type.matcher.v3.MetadataMatcher value) {
if (metadataMatcherBuilder_ == null) {
if (((bitField0_ & 0x00000001) != 0) &&
metadataMatcher_ != null &&
metadataMatcher_ != io.envoyproxy.envoy.type.matcher.v3.MetadataMatcher.getDefaultInstance()) {
getMetadataMatcherBuilder().mergeFrom(value);
} else {
metadataMatcher_ = value;
}
} else {
metadataMatcherBuilder_.mergeFrom(value);
}
if (metadataMatcher_ != null) {
bitField0_ |= 0x00000001;
onChanged();
}
return this;
}
/**
*
* Metadata matcher configuration that defines what metadata to match against. This includes the filter name,
* metadata key path, and expected value.
*
*
* .envoy.type.matcher.v3.MetadataMatcher metadata_matcher = 1 [(.validate.rules) = { ... }
*/
public Builder clearMetadataMatcher() {
bitField0_ = (bitField0_ & ~0x00000001);
metadataMatcher_ = null;
if (metadataMatcherBuilder_ != null) {
metadataMatcherBuilder_.dispose();
metadataMatcherBuilder_ = null;
}
onChanged();
return this;
}
/**
*
* Metadata matcher configuration that defines what metadata to match against. This includes the filter name,
* metadata key path, and expected value.
*
*
* .envoy.type.matcher.v3.MetadataMatcher metadata_matcher = 1 [(.validate.rules) = { ... }
*/
public io.envoyproxy.envoy.type.matcher.v3.MetadataMatcher.Builder getMetadataMatcherBuilder() {
bitField0_ |= 0x00000001;
onChanged();
return getMetadataMatcherFieldBuilder().getBuilder();
}
/**
*
* Metadata matcher configuration that defines what metadata to match against. This includes the filter name,
* metadata key path, and expected value.
*
*
* .envoy.type.matcher.v3.MetadataMatcher metadata_matcher = 1 [(.validate.rules) = { ... }
*/
public io.envoyproxy.envoy.type.matcher.v3.MetadataMatcherOrBuilder getMetadataMatcherOrBuilder() {
if (metadataMatcherBuilder_ != null) {
return metadataMatcherBuilder_.getMessageOrBuilder();
} else {
return metadataMatcher_ == null ?
io.envoyproxy.envoy.type.matcher.v3.MetadataMatcher.getDefaultInstance() : metadataMatcher_;
}
}
/**
*
* Metadata matcher configuration that defines what metadata to match against. This includes the filter name,
* metadata key path, and expected value.
*
*
* .envoy.type.matcher.v3.MetadataMatcher metadata_matcher = 1 [(.validate.rules) = { ... }
*/
private com.google.protobuf.SingleFieldBuilderV3<
io.envoyproxy.envoy.type.matcher.v3.MetadataMatcher, io.envoyproxy.envoy.type.matcher.v3.MetadataMatcher.Builder, io.envoyproxy.envoy.type.matcher.v3.MetadataMatcherOrBuilder>
getMetadataMatcherFieldBuilder() {
if (metadataMatcherBuilder_ == null) {
metadataMatcherBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
io.envoyproxy.envoy.type.matcher.v3.MetadataMatcher, io.envoyproxy.envoy.type.matcher.v3.MetadataMatcher.Builder, io.envoyproxy.envoy.type.matcher.v3.MetadataMatcherOrBuilder>(
getMetadataMatcher(),
getParentForChildren(),
isClean());
metadataMatcher_ = null;
}
return metadataMatcherBuilder_;
}
private int metadataSource_ = 0;
/**
*
* Specifies which metadata source should be used for matching. If not set,
* defaults to DYNAMIC (dynamic metadata). Set to ROUTE to match against
* static metadata configured on the route entry.
*
*
* .envoy.config.rbac.v3.MetadataSource metadata_source = 2 [(.validate.rules) = { ... }
* @return The enum numeric value on the wire for metadataSource.
*/
@java.lang.Override public int getMetadataSourceValue() {
return metadataSource_;
}
/**
*
* Specifies which metadata source should be used for matching. If not set,
* defaults to DYNAMIC (dynamic metadata). Set to ROUTE to match against
* static metadata configured on the route entry.
*
*
* .envoy.config.rbac.v3.MetadataSource metadata_source = 2 [(.validate.rules) = { ... }
* @param value The enum numeric value on the wire for metadataSource to set.
* @return This builder for chaining.
*/
public Builder setMetadataSourceValue(int value) {
metadataSource_ = value;
bitField0_ |= 0x00000002;
onChanged();
return this;
}
/**
*
* Specifies which metadata source should be used for matching. If not set,
* defaults to DYNAMIC (dynamic metadata). Set to ROUTE to match against
* static metadata configured on the route entry.
*
*
* .envoy.config.rbac.v3.MetadataSource metadata_source = 2 [(.validate.rules) = { ... }
* @return The metadataSource.
*/
@java.lang.Override
public io.envoyproxy.envoy.config.rbac.v3.MetadataSource getMetadataSource() {
io.envoyproxy.envoy.config.rbac.v3.MetadataSource result = io.envoyproxy.envoy.config.rbac.v3.MetadataSource.forNumber(metadataSource_);
return result == null ? io.envoyproxy.envoy.config.rbac.v3.MetadataSource.UNRECOGNIZED : result;
}
/**
*
* Specifies which metadata source should be used for matching. If not set,
* defaults to DYNAMIC (dynamic metadata). Set to ROUTE to match against
* static metadata configured on the route entry.
*
*
* .envoy.config.rbac.v3.MetadataSource metadata_source = 2 [(.validate.rules) = { ... }
* @param value The metadataSource to set.
* @return This builder for chaining.
*/
public Builder setMetadataSource(io.envoyproxy.envoy.config.rbac.v3.MetadataSource value) {
if (value == null) {
throw new NullPointerException();
}
bitField0_ |= 0x00000002;
metadataSource_ = value.getNumber();
onChanged();
return this;
}
/**
*
* Specifies which metadata source should be used for matching. If not set,
* defaults to DYNAMIC (dynamic metadata). Set to ROUTE to match against
* static metadata configured on the route entry.
*
*
* .envoy.config.rbac.v3.MetadataSource metadata_source = 2 [(.validate.rules) = { ... }
* @return This builder for chaining.
*/
public Builder clearMetadataSource() {
bitField0_ = (bitField0_ & ~0x00000002);
metadataSource_ = 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.config.rbac.v3.SourcedMetadata)
}
// @@protoc_insertion_point(class_scope:envoy.config.rbac.v3.SourcedMetadata)
private static final io.envoyproxy.envoy.config.rbac.v3.SourcedMetadata DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new io.envoyproxy.envoy.config.rbac.v3.SourcedMetadata();
}
public static io.envoyproxy.envoy.config.rbac.v3.SourcedMetadata getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public SourcedMetadata parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
Builder builder = newBuilder();
try {
builder.mergeFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(builder.buildPartial());
} catch (com.google.protobuf.UninitializedMessageException e) {
throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e)
.setUnfinishedMessage(builder.buildPartial());
}
return builder.buildPartial();
}
};
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.rbac.v3.SourcedMetadata getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy