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/rbac/v3alpha/rbac.proto
package io.envoyproxy.envoy.config.rbac.v3alpha;
/**
*
* Principal defines an identity or a group of identities for a downstream subject.
*
* The name of the principal. If set, The URI SAN or DNS SAN in that order is used from the
* certificate, otherwise the subject field is used. If unset, it applies to any user that is
* authenticated.
*
* The name of the principal. If set, The URI SAN or DNS SAN in that order is used from the
* certificate, otherwise the subject field is used. If unset, it applies to any user that is
* authenticated.
*
* The name of the principal. If set, The URI SAN or DNS SAN in that order is used from the
* certificate, otherwise the subject field is used. If unset, it applies to any user that is
* authenticated.
*
*
* Protobuf type {@code envoy.config.rbac.v3alpha.Principal.Authenticated}
*/
public static final class Authenticated extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:envoy.config.rbac.v3alpha.Principal.Authenticated)
AuthenticatedOrBuilder {
private static final long serialVersionUID = 0L;
// Use Authenticated.newBuilder() to construct.
private Authenticated(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private Authenticated() {
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new Authenticated();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private Authenticated(
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 18: {
io.envoyproxy.envoy.type.matcher.StringMatcher.Builder subBuilder = null;
if (principalName_ != null) {
subBuilder = principalName_.toBuilder();
}
principalName_ = input.readMessage(io.envoyproxy.envoy.type.matcher.StringMatcher.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(principalName_);
principalName_ = subBuilder.buildPartial();
}
break;
}
default: {
if (!parseUnknownField(
input, unknownFields, extensionRegistry, tag)) {
done = true;
}
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(
e).setUnfinishedMessage(this);
} finally {
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return io.envoyproxy.envoy.config.rbac.v3alpha.RbacProto.internal_static_envoy_config_rbac_v3alpha_Principal_Authenticated_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return io.envoyproxy.envoy.config.rbac.v3alpha.RbacProto.internal_static_envoy_config_rbac_v3alpha_Principal_Authenticated_fieldAccessorTable
.ensureFieldAccessorsInitialized(
io.envoyproxy.envoy.config.rbac.v3alpha.Principal.Authenticated.class, io.envoyproxy.envoy.config.rbac.v3alpha.Principal.Authenticated.Builder.class);
}
public static final int PRINCIPAL_NAME_FIELD_NUMBER = 2;
private io.envoyproxy.envoy.type.matcher.StringMatcher principalName_;
/**
*
* The name of the principal. If set, The URI SAN or DNS SAN in that order is used from the
* certificate, otherwise the subject field is used. If unset, it applies to any user that is
* authenticated.
*
* The name of the principal. If set, The URI SAN or DNS SAN in that order is used from the
* certificate, otherwise the subject field is used. If unset, it applies to any user that is
* authenticated.
*
* The name of the principal. If set, The URI SAN or DNS SAN in that order is used from the
* certificate, otherwise the subject field is used. If unset, it applies to any user that is
* authenticated.
*
*
* .envoy.type.matcher.StringMatcher principal_name = 2;
*/
public io.envoyproxy.envoy.type.matcher.StringMatcherOrBuilder getPrincipalNameOrBuilder() {
return getPrincipalName();
}
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 (principalName_ != null) {
output.writeMessage(2, getPrincipalName());
}
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (principalName_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(2, getPrincipalName());
}
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.rbac.v3alpha.Principal.Authenticated)) {
return super.equals(obj);
}
io.envoyproxy.envoy.config.rbac.v3alpha.Principal.Authenticated other = (io.envoyproxy.envoy.config.rbac.v3alpha.Principal.Authenticated) obj;
if (hasPrincipalName() != other.hasPrincipalName()) return false;
if (hasPrincipalName()) {
if (!getPrincipalName()
.equals(other.getPrincipalName())) 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();
if (hasPrincipalName()) {
hash = (37 * hash) + PRINCIPAL_NAME_FIELD_NUMBER;
hash = (53 * hash) + getPrincipalName().hashCode();
}
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static io.envoyproxy.envoy.config.rbac.v3alpha.Principal.Authenticated parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.envoyproxy.envoy.config.rbac.v3alpha.Principal.Authenticated 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.v3alpha.Principal.Authenticated parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.envoyproxy.envoy.config.rbac.v3alpha.Principal.Authenticated 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.v3alpha.Principal.Authenticated parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.envoyproxy.envoy.config.rbac.v3alpha.Principal.Authenticated 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.v3alpha.Principal.Authenticated parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static io.envoyproxy.envoy.config.rbac.v3alpha.Principal.Authenticated 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.v3alpha.Principal.Authenticated parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static io.envoyproxy.envoy.config.rbac.v3alpha.Principal.Authenticated 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.v3alpha.Principal.Authenticated 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.v3alpha.Principal.Authenticated 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.v3alpha.Principal.Authenticated 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;
}
/**
*
* Authentication attributes for a downstream.
*
*
* Protobuf type {@code envoy.config.rbac.v3alpha.Principal.Authenticated}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:envoy.config.rbac.v3alpha.Principal.Authenticated)
io.envoyproxy.envoy.config.rbac.v3alpha.Principal.AuthenticatedOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return io.envoyproxy.envoy.config.rbac.v3alpha.RbacProto.internal_static_envoy_config_rbac_v3alpha_Principal_Authenticated_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return io.envoyproxy.envoy.config.rbac.v3alpha.RbacProto.internal_static_envoy_config_rbac_v3alpha_Principal_Authenticated_fieldAccessorTable
.ensureFieldAccessorsInitialized(
io.envoyproxy.envoy.config.rbac.v3alpha.Principal.Authenticated.class, io.envoyproxy.envoy.config.rbac.v3alpha.Principal.Authenticated.Builder.class);
}
// Construct using io.envoyproxy.envoy.config.rbac.v3alpha.Principal.Authenticated.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();
if (principalNameBuilder_ == null) {
principalName_ = null;
} else {
principalName_ = null;
principalNameBuilder_ = null;
}
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return io.envoyproxy.envoy.config.rbac.v3alpha.RbacProto.internal_static_envoy_config_rbac_v3alpha_Principal_Authenticated_descriptor;
}
@java.lang.Override
public io.envoyproxy.envoy.config.rbac.v3alpha.Principal.Authenticated getDefaultInstanceForType() {
return io.envoyproxy.envoy.config.rbac.v3alpha.Principal.Authenticated.getDefaultInstance();
}
@java.lang.Override
public io.envoyproxy.envoy.config.rbac.v3alpha.Principal.Authenticated build() {
io.envoyproxy.envoy.config.rbac.v3alpha.Principal.Authenticated result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public io.envoyproxy.envoy.config.rbac.v3alpha.Principal.Authenticated buildPartial() {
io.envoyproxy.envoy.config.rbac.v3alpha.Principal.Authenticated result = new io.envoyproxy.envoy.config.rbac.v3alpha.Principal.Authenticated(this);
if (principalNameBuilder_ == null) {
result.principalName_ = principalName_;
} else {
result.principalName_ = principalNameBuilder_.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.rbac.v3alpha.Principal.Authenticated) {
return mergeFrom((io.envoyproxy.envoy.config.rbac.v3alpha.Principal.Authenticated)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(io.envoyproxy.envoy.config.rbac.v3alpha.Principal.Authenticated other) {
if (other == io.envoyproxy.envoy.config.rbac.v3alpha.Principal.Authenticated.getDefaultInstance()) return this;
if (other.hasPrincipalName()) {
mergePrincipalName(other.getPrincipalName());
}
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.rbac.v3alpha.Principal.Authenticated parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (io.envoyproxy.envoy.config.rbac.v3alpha.Principal.Authenticated) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private io.envoyproxy.envoy.type.matcher.StringMatcher principalName_;
private com.google.protobuf.SingleFieldBuilderV3<
io.envoyproxy.envoy.type.matcher.StringMatcher, io.envoyproxy.envoy.type.matcher.StringMatcher.Builder, io.envoyproxy.envoy.type.matcher.StringMatcherOrBuilder> principalNameBuilder_;
/**
*
* The name of the principal. If set, The URI SAN or DNS SAN in that order is used from the
* certificate, otherwise the subject field is used. If unset, it applies to any user that is
* authenticated.
*
* The name of the principal. If set, The URI SAN or DNS SAN in that order is used from the
* certificate, otherwise the subject field is used. If unset, it applies to any user that is
* authenticated.
*
* The name of the principal. If set, The URI SAN or DNS SAN in that order is used from the
* certificate, otherwise the subject field is used. If unset, it applies to any user that is
* authenticated.
*
*
* .envoy.type.matcher.StringMatcher principal_name = 2;
*/
public Builder setPrincipalName(io.envoyproxy.envoy.type.matcher.StringMatcher value) {
if (principalNameBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
principalName_ = value;
onChanged();
} else {
principalNameBuilder_.setMessage(value);
}
return this;
}
/**
*
* The name of the principal. If set, The URI SAN or DNS SAN in that order is used from the
* certificate, otherwise the subject field is used. If unset, it applies to any user that is
* authenticated.
*
* The name of the principal. If set, The URI SAN or DNS SAN in that order is used from the
* certificate, otherwise the subject field is used. If unset, it applies to any user that is
* authenticated.
*
* The name of the principal. If set, The URI SAN or DNS SAN in that order is used from the
* certificate, otherwise the subject field is used. If unset, it applies to any user that is
* authenticated.
*
* The name of the principal. If set, The URI SAN or DNS SAN in that order is used from the
* certificate, otherwise the subject field is used. If unset, it applies to any user that is
* authenticated.
*
* The name of the principal. If set, The URI SAN or DNS SAN in that order is used from the
* certificate, otherwise the subject field is used. If unset, it applies to any user that is
* authenticated.
*
* The name of the principal. If set, The URI SAN or DNS SAN in that order is used from the
* certificate, otherwise the subject field is used. If unset, it applies to any user that is
* authenticated.
*
*
* .envoy.type.matcher.StringMatcher principal_name = 2;
*/
private com.google.protobuf.SingleFieldBuilderV3<
io.envoyproxy.envoy.type.matcher.StringMatcher, io.envoyproxy.envoy.type.matcher.StringMatcher.Builder, io.envoyproxy.envoy.type.matcher.StringMatcherOrBuilder>
getPrincipalNameFieldBuilder() {
if (principalNameBuilder_ == null) {
principalNameBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
io.envoyproxy.envoy.type.matcher.StringMatcher, io.envoyproxy.envoy.type.matcher.StringMatcher.Builder, io.envoyproxy.envoy.type.matcher.StringMatcherOrBuilder>(
getPrincipalName(),
getParentForChildren(),
isClean());
principalName_ = null;
}
return principalNameBuilder_;
}
@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.v3alpha.Principal.Authenticated)
}
// @@protoc_insertion_point(class_scope:envoy.config.rbac.v3alpha.Principal.Authenticated)
private static final io.envoyproxy.envoy.config.rbac.v3alpha.Principal.Authenticated DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new io.envoyproxy.envoy.config.rbac.v3alpha.Principal.Authenticated();
}
public static io.envoyproxy.envoy.config.rbac.v3alpha.Principal.Authenticated getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public Authenticated parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new Authenticated(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.rbac.v3alpha.Principal.Authenticated getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
private int identifierCase_ = 0;
private java.lang.Object identifier_;
public enum IdentifierCase
implements com.google.protobuf.Internal.EnumLite {
AND_IDS(1),
OR_IDS(2),
ANY(3),
AUTHENTICATED(4),
SOURCE_IP(5),
HEADER(6),
METADATA(7),
NOT_ID(8),
IDENTIFIER_NOT_SET(0);
private final int value;
private IdentifierCase(int value) {
this.value = value;
}
/**
* @deprecated Use {@link #forNumber(int)} instead.
*/
@java.lang.Deprecated
public static IdentifierCase valueOf(int value) {
return forNumber(value);
}
public static IdentifierCase forNumber(int value) {
switch (value) {
case 1: return AND_IDS;
case 2: return OR_IDS;
case 3: return ANY;
case 4: return AUTHENTICATED;
case 5: return SOURCE_IP;
case 6: return HEADER;
case 7: return METADATA;
case 8: return NOT_ID;
case 0: return IDENTIFIER_NOT_SET;
default: return null;
}
}
public int getNumber() {
return this.value;
}
};
public IdentifierCase
getIdentifierCase() {
return IdentifierCase.forNumber(
identifierCase_);
}
public static final int AND_IDS_FIELD_NUMBER = 1;
/**
*
* A set of identifiers that all must match in order to define the downstream.
*
* Metadata that describes additional information about the principal.
*
*
* .envoy.type.matcher.MetadataMatcher metadata = 7;
*/
public io.envoyproxy.envoy.type.matcher.MetadataMatcherOrBuilder getMetadataOrBuilder() {
if (identifierCase_ == 7) {
return (io.envoyproxy.envoy.type.matcher.MetadataMatcher) identifier_;
}
return io.envoyproxy.envoy.type.matcher.MetadataMatcher.getDefaultInstance();
}
public static final int NOT_ID_FIELD_NUMBER = 8;
/**
*
* Negates matching the provided principal. For instance, if the value of `not_id` would match,
* this principal would not match. Conversely, if the value of `not_id` would not match, this
* principal would match.
*
* Negates matching the provided principal. For instance, if the value of `not_id` would match,
* this principal would not match. Conversely, if the value of `not_id` would not match, this
* principal would match.
*
* Negates matching the provided principal. For instance, if the value of `not_id` would match,
* this principal would not match. Conversely, if the value of `not_id` would not match, this
* principal would match.
*
*
* .envoy.config.rbac.v3alpha.Principal not_id = 8;
*/
public io.envoyproxy.envoy.config.rbac.v3alpha.PrincipalOrBuilder getNotIdOrBuilder() {
if (identifierCase_ == 8) {
return (io.envoyproxy.envoy.config.rbac.v3alpha.Principal) identifier_;
}
return io.envoyproxy.envoy.config.rbac.v3alpha.Principal.getDefaultInstance();
}
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 (identifierCase_ == 1) {
output.writeMessage(1, (io.envoyproxy.envoy.config.rbac.v3alpha.Principal.Set) identifier_);
}
if (identifierCase_ == 2) {
output.writeMessage(2, (io.envoyproxy.envoy.config.rbac.v3alpha.Principal.Set) identifier_);
}
if (identifierCase_ == 3) {
output.writeBool(
3, (boolean)((java.lang.Boolean) identifier_));
}
if (identifierCase_ == 4) {
output.writeMessage(4, (io.envoyproxy.envoy.config.rbac.v3alpha.Principal.Authenticated) identifier_);
}
if (identifierCase_ == 5) {
output.writeMessage(5, (io.envoyproxy.envoy.api.v3alpha.core.CidrRange) identifier_);
}
if (identifierCase_ == 6) {
output.writeMessage(6, (io.envoyproxy.envoy.api.v3alpha.route.HeaderMatcher) identifier_);
}
if (identifierCase_ == 7) {
output.writeMessage(7, (io.envoyproxy.envoy.type.matcher.MetadataMatcher) identifier_);
}
if (identifierCase_ == 8) {
output.writeMessage(8, (io.envoyproxy.envoy.config.rbac.v3alpha.Principal) identifier_);
}
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (identifierCase_ == 1) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(1, (io.envoyproxy.envoy.config.rbac.v3alpha.Principal.Set) identifier_);
}
if (identifierCase_ == 2) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(2, (io.envoyproxy.envoy.config.rbac.v3alpha.Principal.Set) identifier_);
}
if (identifierCase_ == 3) {
size += com.google.protobuf.CodedOutputStream
.computeBoolSize(
3, (boolean)((java.lang.Boolean) identifier_));
}
if (identifierCase_ == 4) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(4, (io.envoyproxy.envoy.config.rbac.v3alpha.Principal.Authenticated) identifier_);
}
if (identifierCase_ == 5) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(5, (io.envoyproxy.envoy.api.v3alpha.core.CidrRange) identifier_);
}
if (identifierCase_ == 6) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(6, (io.envoyproxy.envoy.api.v3alpha.route.HeaderMatcher) identifier_);
}
if (identifierCase_ == 7) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(7, (io.envoyproxy.envoy.type.matcher.MetadataMatcher) identifier_);
}
if (identifierCase_ == 8) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(8, (io.envoyproxy.envoy.config.rbac.v3alpha.Principal) identifier_);
}
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.rbac.v3alpha.Principal)) {
return super.equals(obj);
}
io.envoyproxy.envoy.config.rbac.v3alpha.Principal other = (io.envoyproxy.envoy.config.rbac.v3alpha.Principal) obj;
if (!getIdentifierCase().equals(other.getIdentifierCase())) return false;
switch (identifierCase_) {
case 1:
if (!getAndIds()
.equals(other.getAndIds())) return false;
break;
case 2:
if (!getOrIds()
.equals(other.getOrIds())) return false;
break;
case 3:
if (getAny()
!= other.getAny()) return false;
break;
case 4:
if (!getAuthenticated()
.equals(other.getAuthenticated())) return false;
break;
case 5:
if (!getSourceIp()
.equals(other.getSourceIp())) return false;
break;
case 6:
if (!getHeader()
.equals(other.getHeader())) return false;
break;
case 7:
if (!getMetadata()
.equals(other.getMetadata())) return false;
break;
case 8:
if (!getNotId()
.equals(other.getNotId())) 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 (identifierCase_) {
case 1:
hash = (37 * hash) + AND_IDS_FIELD_NUMBER;
hash = (53 * hash) + getAndIds().hashCode();
break;
case 2:
hash = (37 * hash) + OR_IDS_FIELD_NUMBER;
hash = (53 * hash) + getOrIds().hashCode();
break;
case 3:
hash = (37 * hash) + ANY_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(
getAny());
break;
case 4:
hash = (37 * hash) + AUTHENTICATED_FIELD_NUMBER;
hash = (53 * hash) + getAuthenticated().hashCode();
break;
case 5:
hash = (37 * hash) + SOURCE_IP_FIELD_NUMBER;
hash = (53 * hash) + getSourceIp().hashCode();
break;
case 6:
hash = (37 * hash) + HEADER_FIELD_NUMBER;
hash = (53 * hash) + getHeader().hashCode();
break;
case 7:
hash = (37 * hash) + METADATA_FIELD_NUMBER;
hash = (53 * hash) + getMetadata().hashCode();
break;
case 8:
hash = (37 * hash) + NOT_ID_FIELD_NUMBER;
hash = (53 * hash) + getNotId().hashCode();
break;
case 0:
default:
}
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static io.envoyproxy.envoy.config.rbac.v3alpha.Principal parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.envoyproxy.envoy.config.rbac.v3alpha.Principal 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.v3alpha.Principal parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.envoyproxy.envoy.config.rbac.v3alpha.Principal 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.v3alpha.Principal parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.envoyproxy.envoy.config.rbac.v3alpha.Principal 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.v3alpha.Principal parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static io.envoyproxy.envoy.config.rbac.v3alpha.Principal 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.v3alpha.Principal parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static io.envoyproxy.envoy.config.rbac.v3alpha.Principal 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.v3alpha.Principal 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.v3alpha.Principal 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.v3alpha.Principal 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;
}
/**
*
* Principal defines an identity or a group of identities for a downstream subject.
*
*
* Protobuf type {@code envoy.config.rbac.v3alpha.Principal}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:envoy.config.rbac.v3alpha.Principal)
io.envoyproxy.envoy.config.rbac.v3alpha.PrincipalOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return io.envoyproxy.envoy.config.rbac.v3alpha.RbacProto.internal_static_envoy_config_rbac_v3alpha_Principal_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return io.envoyproxy.envoy.config.rbac.v3alpha.RbacProto.internal_static_envoy_config_rbac_v3alpha_Principal_fieldAccessorTable
.ensureFieldAccessorsInitialized(
io.envoyproxy.envoy.config.rbac.v3alpha.Principal.class, io.envoyproxy.envoy.config.rbac.v3alpha.Principal.Builder.class);
}
// Construct using io.envoyproxy.envoy.config.rbac.v3alpha.Principal.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();
identifierCase_ = 0;
identifier_ = null;
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return io.envoyproxy.envoy.config.rbac.v3alpha.RbacProto.internal_static_envoy_config_rbac_v3alpha_Principal_descriptor;
}
@java.lang.Override
public io.envoyproxy.envoy.config.rbac.v3alpha.Principal getDefaultInstanceForType() {
return io.envoyproxy.envoy.config.rbac.v3alpha.Principal.getDefaultInstance();
}
@java.lang.Override
public io.envoyproxy.envoy.config.rbac.v3alpha.Principal build() {
io.envoyproxy.envoy.config.rbac.v3alpha.Principal result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public io.envoyproxy.envoy.config.rbac.v3alpha.Principal buildPartial() {
io.envoyproxy.envoy.config.rbac.v3alpha.Principal result = new io.envoyproxy.envoy.config.rbac.v3alpha.Principal(this);
if (identifierCase_ == 1) {
if (andIdsBuilder_ == null) {
result.identifier_ = identifier_;
} else {
result.identifier_ = andIdsBuilder_.build();
}
}
if (identifierCase_ == 2) {
if (orIdsBuilder_ == null) {
result.identifier_ = identifier_;
} else {
result.identifier_ = orIdsBuilder_.build();
}
}
if (identifierCase_ == 3) {
result.identifier_ = identifier_;
}
if (identifierCase_ == 4) {
if (authenticatedBuilder_ == null) {
result.identifier_ = identifier_;
} else {
result.identifier_ = authenticatedBuilder_.build();
}
}
if (identifierCase_ == 5) {
if (sourceIpBuilder_ == null) {
result.identifier_ = identifier_;
} else {
result.identifier_ = sourceIpBuilder_.build();
}
}
if (identifierCase_ == 6) {
if (headerBuilder_ == null) {
result.identifier_ = identifier_;
} else {
result.identifier_ = headerBuilder_.build();
}
}
if (identifierCase_ == 7) {
if (metadataBuilder_ == null) {
result.identifier_ = identifier_;
} else {
result.identifier_ = metadataBuilder_.build();
}
}
if (identifierCase_ == 8) {
if (notIdBuilder_ == null) {
result.identifier_ = identifier_;
} else {
result.identifier_ = notIdBuilder_.build();
}
}
result.identifierCase_ = identifierCase_;
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.rbac.v3alpha.Principal) {
return mergeFrom((io.envoyproxy.envoy.config.rbac.v3alpha.Principal)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(io.envoyproxy.envoy.config.rbac.v3alpha.Principal other) {
if (other == io.envoyproxy.envoy.config.rbac.v3alpha.Principal.getDefaultInstance()) return this;
switch (other.getIdentifierCase()) {
case AND_IDS: {
mergeAndIds(other.getAndIds());
break;
}
case OR_IDS: {
mergeOrIds(other.getOrIds());
break;
}
case ANY: {
setAny(other.getAny());
break;
}
case AUTHENTICATED: {
mergeAuthenticated(other.getAuthenticated());
break;
}
case SOURCE_IP: {
mergeSourceIp(other.getSourceIp());
break;
}
case HEADER: {
mergeHeader(other.getHeader());
break;
}
case METADATA: {
mergeMetadata(other.getMetadata());
break;
}
case NOT_ID: {
mergeNotId(other.getNotId());
break;
}
case IDENTIFIER_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.rbac.v3alpha.Principal parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (io.envoyproxy.envoy.config.rbac.v3alpha.Principal) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int identifierCase_ = 0;
private java.lang.Object identifier_;
public IdentifierCase
getIdentifierCase() {
return IdentifierCase.forNumber(
identifierCase_);
}
public Builder clearIdentifier() {
identifierCase_ = 0;
identifier_ = null;
onChanged();
return this;
}
private com.google.protobuf.SingleFieldBuilderV3<
io.envoyproxy.envoy.config.rbac.v3alpha.Principal.Set, io.envoyproxy.envoy.config.rbac.v3alpha.Principal.Set.Builder, io.envoyproxy.envoy.config.rbac.v3alpha.Principal.SetOrBuilder> andIdsBuilder_;
/**
*
* A set of identifiers that all must match in order to define the downstream.
*
* Negates matching the provided principal. For instance, if the value of `not_id` would match,
* this principal would not match. Conversely, if the value of `not_id` would not match, this
* principal would match.
*
* Negates matching the provided principal. For instance, if the value of `not_id` would match,
* this principal would not match. Conversely, if the value of `not_id` would not match, this
* principal would match.
*
* Negates matching the provided principal. For instance, if the value of `not_id` would match,
* this principal would not match. Conversely, if the value of `not_id` would not match, this
* principal would match.
*
* Negates matching the provided principal. For instance, if the value of `not_id` would match,
* this principal would not match. Conversely, if the value of `not_id` would not match, this
* principal would match.
*
* Negates matching the provided principal. For instance, if the value of `not_id` would match,
* this principal would not match. Conversely, if the value of `not_id` would not match, this
* principal would match.
*
* Negates matching the provided principal. For instance, if the value of `not_id` would match,
* this principal would not match. Conversely, if the value of `not_id` would not match, this
* principal would match.
*
* Negates matching the provided principal. For instance, if the value of `not_id` would match,
* this principal would not match. Conversely, if the value of `not_id` would not match, this
* principal would match.
*
* Negates matching the provided principal. For instance, if the value of `not_id` would match,
* this principal would not match. Conversely, if the value of `not_id` would not match, this
* principal would match.
*
* Negates matching the provided principal. For instance, if the value of `not_id` would match,
* this principal would not match. Conversely, if the value of `not_id` would not match, this
* principal would match.
*
*
* .envoy.config.rbac.v3alpha.Principal not_id = 8;
*/
private com.google.protobuf.SingleFieldBuilderV3<
io.envoyproxy.envoy.config.rbac.v3alpha.Principal, io.envoyproxy.envoy.config.rbac.v3alpha.Principal.Builder, io.envoyproxy.envoy.config.rbac.v3alpha.PrincipalOrBuilder>
getNotIdFieldBuilder() {
if (notIdBuilder_ == null) {
if (!(identifierCase_ == 8)) {
identifier_ = io.envoyproxy.envoy.config.rbac.v3alpha.Principal.getDefaultInstance();
}
notIdBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
io.envoyproxy.envoy.config.rbac.v3alpha.Principal, io.envoyproxy.envoy.config.rbac.v3alpha.Principal.Builder, io.envoyproxy.envoy.config.rbac.v3alpha.PrincipalOrBuilder>(
(io.envoyproxy.envoy.config.rbac.v3alpha.Principal) identifier_,
getParentForChildren(),
isClean());
identifier_ = null;
}
identifierCase_ = 8;
onChanged();;
return notIdBuilder_;
}
@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.v3alpha.Principal)
}
// @@protoc_insertion_point(class_scope:envoy.config.rbac.v3alpha.Principal)
private static final io.envoyproxy.envoy.config.rbac.v3alpha.Principal DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new io.envoyproxy.envoy.config.rbac.v3alpha.Principal();
}
public static io.envoyproxy.envoy.config.rbac.v3alpha.Principal getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public Principal parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new Principal(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.rbac.v3alpha.Principal getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}