io.envoyproxy.envoy.config.rbac.v3.Policy 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.5
package io.envoyproxy.envoy.config.rbac.v3;
/**
*
* Policy specifies a role and the principals that are assigned/denied the role.
* A policy matches if and only if at least one of its permissions match the
* action taking place AND at least one of its principals match the downstream
* AND the condition is true if specified.
*
*
* Protobuf type {@code envoy.config.rbac.v3.Policy}
*/
public final class Policy extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:envoy.config.rbac.v3.Policy)
PolicyOrBuilder {
private static final long serialVersionUID = 0L;
// Use Policy.newBuilder() to construct.
private Policy(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private Policy() {
permissions_ = java.util.Collections.emptyList();
principals_ = java.util.Collections.emptyList();
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new Policy();
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return io.envoyproxy.envoy.config.rbac.v3.RbacProto.internal_static_envoy_config_rbac_v3_Policy_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_Policy_fieldAccessorTable
.ensureFieldAccessorsInitialized(
io.envoyproxy.envoy.config.rbac.v3.Policy.class, io.envoyproxy.envoy.config.rbac.v3.Policy.Builder.class);
}
private int bitField0_;
public static final int PERMISSIONS_FIELD_NUMBER = 1;
@SuppressWarnings("serial")
private java.util.List permissions_;
/**
*
* Required. The set of permissions that define a role. Each permission is
* matched with OR semantics. To match all actions for this policy, a single
* Permission with the ``any`` field set to true should be used.
*
*
* repeated .envoy.config.rbac.v3.Permission permissions = 1 [(.validate.rules) = { ... }
*/
@java.lang.Override
public java.util.List getPermissionsList() {
return permissions_;
}
/**
*
* Required. The set of permissions that define a role. Each permission is
* matched with OR semantics. To match all actions for this policy, a single
* Permission with the ``any`` field set to true should be used.
*
*
* repeated .envoy.config.rbac.v3.Permission permissions = 1 [(.validate.rules) = { ... }
*/
@java.lang.Override
public java.util.List extends io.envoyproxy.envoy.config.rbac.v3.PermissionOrBuilder>
getPermissionsOrBuilderList() {
return permissions_;
}
/**
*
* Required. The set of permissions that define a role. Each permission is
* matched with OR semantics. To match all actions for this policy, a single
* Permission with the ``any`` field set to true should be used.
*
*
* repeated .envoy.config.rbac.v3.Permission permissions = 1 [(.validate.rules) = { ... }
*/
@java.lang.Override
public int getPermissionsCount() {
return permissions_.size();
}
/**
*
* Required. The set of permissions that define a role. Each permission is
* matched with OR semantics. To match all actions for this policy, a single
* Permission with the ``any`` field set to true should be used.
*
*
* repeated .envoy.config.rbac.v3.Permission permissions = 1 [(.validate.rules) = { ... }
*/
@java.lang.Override
public io.envoyproxy.envoy.config.rbac.v3.Permission getPermissions(int index) {
return permissions_.get(index);
}
/**
*
* Required. The set of permissions that define a role. Each permission is
* matched with OR semantics. To match all actions for this policy, a single
* Permission with the ``any`` field set to true should be used.
*
*
* repeated .envoy.config.rbac.v3.Permission permissions = 1 [(.validate.rules) = { ... }
*/
@java.lang.Override
public io.envoyproxy.envoy.config.rbac.v3.PermissionOrBuilder getPermissionsOrBuilder(
int index) {
return permissions_.get(index);
}
public static final int PRINCIPALS_FIELD_NUMBER = 2;
@SuppressWarnings("serial")
private java.util.List principals_;
/**
*
* Required. The set of principals that are assigned/denied the role based on
* “action”. Each principal is matched with OR semantics. To match all
* downstreams for this policy, a single Principal with the ``any`` field set to
* true should be used.
*
*
* repeated .envoy.config.rbac.v3.Principal principals = 2 [(.validate.rules) = { ... }
*/
@java.lang.Override
public java.util.List getPrincipalsList() {
return principals_;
}
/**
*
* Required. The set of principals that are assigned/denied the role based on
* “action”. Each principal is matched with OR semantics. To match all
* downstreams for this policy, a single Principal with the ``any`` field set to
* true should be used.
*
*
* repeated .envoy.config.rbac.v3.Principal principals = 2 [(.validate.rules) = { ... }
*/
@java.lang.Override
public java.util.List extends io.envoyproxy.envoy.config.rbac.v3.PrincipalOrBuilder>
getPrincipalsOrBuilderList() {
return principals_;
}
/**
*
* Required. The set of principals that are assigned/denied the role based on
* “action”. Each principal is matched with OR semantics. To match all
* downstreams for this policy, a single Principal with the ``any`` field set to
* true should be used.
*
*
* repeated .envoy.config.rbac.v3.Principal principals = 2 [(.validate.rules) = { ... }
*/
@java.lang.Override
public int getPrincipalsCount() {
return principals_.size();
}
/**
*
* Required. The set of principals that are assigned/denied the role based on
* “action”. Each principal is matched with OR semantics. To match all
* downstreams for this policy, a single Principal with the ``any`` field set to
* true should be used.
*
*
* repeated .envoy.config.rbac.v3.Principal principals = 2 [(.validate.rules) = { ... }
*/
@java.lang.Override
public io.envoyproxy.envoy.config.rbac.v3.Principal getPrincipals(int index) {
return principals_.get(index);
}
/**
*
* Required. The set of principals that are assigned/denied the role based on
* “action”. Each principal is matched with OR semantics. To match all
* downstreams for this policy, a single Principal with the ``any`` field set to
* true should be used.
*
*
* repeated .envoy.config.rbac.v3.Principal principals = 2 [(.validate.rules) = { ... }
*/
@java.lang.Override
public io.envoyproxy.envoy.config.rbac.v3.PrincipalOrBuilder getPrincipalsOrBuilder(
int index) {
return principals_.get(index);
}
public static final int CONDITION_FIELD_NUMBER = 3;
private com.google.api.expr.v1alpha1.Expr condition_;
/**
*
* An optional symbolic expression specifying an access control
* :ref:`condition <arch_overview_condition>`. The condition is combined
* with the permissions and the principals as a clause with AND semantics.
* Only be used when checked_condition is not used.
*
*
* .google.api.expr.v1alpha1.Expr condition = 3 [(.udpa.annotations.field_migrate) = { ... }
* @return Whether the condition field is set.
*/
@java.lang.Override
public boolean hasCondition() {
return ((bitField0_ & 0x00000001) != 0);
}
/**
*
* An optional symbolic expression specifying an access control
* :ref:`condition <arch_overview_condition>`. The condition is combined
* with the permissions and the principals as a clause with AND semantics.
* Only be used when checked_condition is not used.
*
*
* .google.api.expr.v1alpha1.Expr condition = 3 [(.udpa.annotations.field_migrate) = { ... }
* @return The condition.
*/
@java.lang.Override
public com.google.api.expr.v1alpha1.Expr getCondition() {
return condition_ == null ? com.google.api.expr.v1alpha1.Expr.getDefaultInstance() : condition_;
}
/**
*
* An optional symbolic expression specifying an access control
* :ref:`condition <arch_overview_condition>`. The condition is combined
* with the permissions and the principals as a clause with AND semantics.
* Only be used when checked_condition is not used.
*
*
* .google.api.expr.v1alpha1.Expr condition = 3 [(.udpa.annotations.field_migrate) = { ... }
*/
@java.lang.Override
public com.google.api.expr.v1alpha1.ExprOrBuilder getConditionOrBuilder() {
return condition_ == null ? com.google.api.expr.v1alpha1.Expr.getDefaultInstance() : condition_;
}
public static final int CHECKED_CONDITION_FIELD_NUMBER = 4;
private com.google.api.expr.v1alpha1.CheckedExpr checkedCondition_;
/**
*
* [#not-implemented-hide:]
* An optional symbolic expression that has been successfully type checked.
* Only be used when condition is not used.
*
*
* .google.api.expr.v1alpha1.CheckedExpr checked_condition = 4 [(.udpa.annotations.field_migrate) = { ... }
* @return Whether the checkedCondition field is set.
*/
@java.lang.Override
public boolean hasCheckedCondition() {
return ((bitField0_ & 0x00000002) != 0);
}
/**
*
* [#not-implemented-hide:]
* An optional symbolic expression that has been successfully type checked.
* Only be used when condition is not used.
*
*
* .google.api.expr.v1alpha1.CheckedExpr checked_condition = 4 [(.udpa.annotations.field_migrate) = { ... }
* @return The checkedCondition.
*/
@java.lang.Override
public com.google.api.expr.v1alpha1.CheckedExpr getCheckedCondition() {
return checkedCondition_ == null ? com.google.api.expr.v1alpha1.CheckedExpr.getDefaultInstance() : checkedCondition_;
}
/**
*
* [#not-implemented-hide:]
* An optional symbolic expression that has been successfully type checked.
* Only be used when condition is not used.
*
*
* .google.api.expr.v1alpha1.CheckedExpr checked_condition = 4 [(.udpa.annotations.field_migrate) = { ... }
*/
@java.lang.Override
public com.google.api.expr.v1alpha1.CheckedExprOrBuilder getCheckedConditionOrBuilder() {
return checkedCondition_ == null ? com.google.api.expr.v1alpha1.CheckedExpr.getDefaultInstance() : checkedCondition_;
}
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 {
for (int i = 0; i < permissions_.size(); i++) {
output.writeMessage(1, permissions_.get(i));
}
for (int i = 0; i < principals_.size(); i++) {
output.writeMessage(2, principals_.get(i));
}
if (((bitField0_ & 0x00000001) != 0)) {
output.writeMessage(3, getCondition());
}
if (((bitField0_ & 0x00000002) != 0)) {
output.writeMessage(4, getCheckedCondition());
}
getUnknownFields().writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
for (int i = 0; i < permissions_.size(); i++) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(1, permissions_.get(i));
}
for (int i = 0; i < principals_.size(); i++) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(2, principals_.get(i));
}
if (((bitField0_ & 0x00000001) != 0)) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(3, getCondition());
}
if (((bitField0_ & 0x00000002) != 0)) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(4, getCheckedCondition());
}
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.Policy)) {
return super.equals(obj);
}
io.envoyproxy.envoy.config.rbac.v3.Policy other = (io.envoyproxy.envoy.config.rbac.v3.Policy) obj;
if (!getPermissionsList()
.equals(other.getPermissionsList())) return false;
if (!getPrincipalsList()
.equals(other.getPrincipalsList())) return false;
if (hasCondition() != other.hasCondition()) return false;
if (hasCondition()) {
if (!getCondition()
.equals(other.getCondition())) return false;
}
if (hasCheckedCondition() != other.hasCheckedCondition()) return false;
if (hasCheckedCondition()) {
if (!getCheckedCondition()
.equals(other.getCheckedCondition())) 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 (getPermissionsCount() > 0) {
hash = (37 * hash) + PERMISSIONS_FIELD_NUMBER;
hash = (53 * hash) + getPermissionsList().hashCode();
}
if (getPrincipalsCount() > 0) {
hash = (37 * hash) + PRINCIPALS_FIELD_NUMBER;
hash = (53 * hash) + getPrincipalsList().hashCode();
}
if (hasCondition()) {
hash = (37 * hash) + CONDITION_FIELD_NUMBER;
hash = (53 * hash) + getCondition().hashCode();
}
if (hasCheckedCondition()) {
hash = (37 * hash) + CHECKED_CONDITION_FIELD_NUMBER;
hash = (53 * hash) + getCheckedCondition().hashCode();
}
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static io.envoyproxy.envoy.config.rbac.v3.Policy parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.envoyproxy.envoy.config.rbac.v3.Policy 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.Policy parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.envoyproxy.envoy.config.rbac.v3.Policy 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.Policy parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.envoyproxy.envoy.config.rbac.v3.Policy 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.Policy 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.Policy 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.Policy 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.Policy 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.Policy 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.Policy 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.Policy 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;
}
/**
*
* Policy specifies a role and the principals that are assigned/denied the role.
* A policy matches if and only if at least one of its permissions match the
* action taking place AND at least one of its principals match the downstream
* AND the condition is true if specified.
*
*
* Protobuf type {@code envoy.config.rbac.v3.Policy}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:envoy.config.rbac.v3.Policy)
io.envoyproxy.envoy.config.rbac.v3.PolicyOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return io.envoyproxy.envoy.config.rbac.v3.RbacProto.internal_static_envoy_config_rbac_v3_Policy_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_Policy_fieldAccessorTable
.ensureFieldAccessorsInitialized(
io.envoyproxy.envoy.config.rbac.v3.Policy.class, io.envoyproxy.envoy.config.rbac.v3.Policy.Builder.class);
}
// Construct using io.envoyproxy.envoy.config.rbac.v3.Policy.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
getPermissionsFieldBuilder();
getPrincipalsFieldBuilder();
getConditionFieldBuilder();
getCheckedConditionFieldBuilder();
}
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
if (permissionsBuilder_ == null) {
permissions_ = java.util.Collections.emptyList();
} else {
permissions_ = null;
permissionsBuilder_.clear();
}
bitField0_ = (bitField0_ & ~0x00000001);
if (principalsBuilder_ == null) {
principals_ = java.util.Collections.emptyList();
} else {
principals_ = null;
principalsBuilder_.clear();
}
bitField0_ = (bitField0_ & ~0x00000002);
condition_ = null;
if (conditionBuilder_ != null) {
conditionBuilder_.dispose();
conditionBuilder_ = null;
}
checkedCondition_ = null;
if (checkedConditionBuilder_ != null) {
checkedConditionBuilder_.dispose();
checkedConditionBuilder_ = null;
}
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_Policy_descriptor;
}
@java.lang.Override
public io.envoyproxy.envoy.config.rbac.v3.Policy getDefaultInstanceForType() {
return io.envoyproxy.envoy.config.rbac.v3.Policy.getDefaultInstance();
}
@java.lang.Override
public io.envoyproxy.envoy.config.rbac.v3.Policy build() {
io.envoyproxy.envoy.config.rbac.v3.Policy result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public io.envoyproxy.envoy.config.rbac.v3.Policy buildPartial() {
io.envoyproxy.envoy.config.rbac.v3.Policy result = new io.envoyproxy.envoy.config.rbac.v3.Policy(this);
buildPartialRepeatedFields(result);
if (bitField0_ != 0) { buildPartial0(result); }
onBuilt();
return result;
}
private void buildPartialRepeatedFields(io.envoyproxy.envoy.config.rbac.v3.Policy result) {
if (permissionsBuilder_ == null) {
if (((bitField0_ & 0x00000001) != 0)) {
permissions_ = java.util.Collections.unmodifiableList(permissions_);
bitField0_ = (bitField0_ & ~0x00000001);
}
result.permissions_ = permissions_;
} else {
result.permissions_ = permissionsBuilder_.build();
}
if (principalsBuilder_ == null) {
if (((bitField0_ & 0x00000002) != 0)) {
principals_ = java.util.Collections.unmodifiableList(principals_);
bitField0_ = (bitField0_ & ~0x00000002);
}
result.principals_ = principals_;
} else {
result.principals_ = principalsBuilder_.build();
}
}
private void buildPartial0(io.envoyproxy.envoy.config.rbac.v3.Policy result) {
int from_bitField0_ = bitField0_;
int to_bitField0_ = 0;
if (((from_bitField0_ & 0x00000004) != 0)) {
result.condition_ = conditionBuilder_ == null
? condition_
: conditionBuilder_.build();
to_bitField0_ |= 0x00000001;
}
if (((from_bitField0_ & 0x00000008) != 0)) {
result.checkedCondition_ = checkedConditionBuilder_ == null
? checkedCondition_
: checkedConditionBuilder_.build();
to_bitField0_ |= 0x00000002;
}
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.Policy) {
return mergeFrom((io.envoyproxy.envoy.config.rbac.v3.Policy)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(io.envoyproxy.envoy.config.rbac.v3.Policy other) {
if (other == io.envoyproxy.envoy.config.rbac.v3.Policy.getDefaultInstance()) return this;
if (permissionsBuilder_ == null) {
if (!other.permissions_.isEmpty()) {
if (permissions_.isEmpty()) {
permissions_ = other.permissions_;
bitField0_ = (bitField0_ & ~0x00000001);
} else {
ensurePermissionsIsMutable();
permissions_.addAll(other.permissions_);
}
onChanged();
}
} else {
if (!other.permissions_.isEmpty()) {
if (permissionsBuilder_.isEmpty()) {
permissionsBuilder_.dispose();
permissionsBuilder_ = null;
permissions_ = other.permissions_;
bitField0_ = (bitField0_ & ~0x00000001);
permissionsBuilder_ =
com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
getPermissionsFieldBuilder() : null;
} else {
permissionsBuilder_.addAllMessages(other.permissions_);
}
}
}
if (principalsBuilder_ == null) {
if (!other.principals_.isEmpty()) {
if (principals_.isEmpty()) {
principals_ = other.principals_;
bitField0_ = (bitField0_ & ~0x00000002);
} else {
ensurePrincipalsIsMutable();
principals_.addAll(other.principals_);
}
onChanged();
}
} else {
if (!other.principals_.isEmpty()) {
if (principalsBuilder_.isEmpty()) {
principalsBuilder_.dispose();
principalsBuilder_ = null;
principals_ = other.principals_;
bitField0_ = (bitField0_ & ~0x00000002);
principalsBuilder_ =
com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
getPrincipalsFieldBuilder() : null;
} else {
principalsBuilder_.addAllMessages(other.principals_);
}
}
}
if (other.hasCondition()) {
mergeCondition(other.getCondition());
}
if (other.hasCheckedCondition()) {
mergeCheckedCondition(other.getCheckedCondition());
}
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: {
io.envoyproxy.envoy.config.rbac.v3.Permission m =
input.readMessage(
io.envoyproxy.envoy.config.rbac.v3.Permission.parser(),
extensionRegistry);
if (permissionsBuilder_ == null) {
ensurePermissionsIsMutable();
permissions_.add(m);
} else {
permissionsBuilder_.addMessage(m);
}
break;
} // case 10
case 18: {
io.envoyproxy.envoy.config.rbac.v3.Principal m =
input.readMessage(
io.envoyproxy.envoy.config.rbac.v3.Principal.parser(),
extensionRegistry);
if (principalsBuilder_ == null) {
ensurePrincipalsIsMutable();
principals_.add(m);
} else {
principalsBuilder_.addMessage(m);
}
break;
} // case 18
case 26: {
input.readMessage(
getConditionFieldBuilder().getBuilder(),
extensionRegistry);
bitField0_ |= 0x00000004;
break;
} // case 26
case 34: {
input.readMessage(
getCheckedConditionFieldBuilder().getBuilder(),
extensionRegistry);
bitField0_ |= 0x00000008;
break;
} // case 34
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 java.util.List permissions_ =
java.util.Collections.emptyList();
private void ensurePermissionsIsMutable() {
if (!((bitField0_ & 0x00000001) != 0)) {
permissions_ = new java.util.ArrayList(permissions_);
bitField0_ |= 0x00000001;
}
}
private com.google.protobuf.RepeatedFieldBuilderV3<
io.envoyproxy.envoy.config.rbac.v3.Permission, io.envoyproxy.envoy.config.rbac.v3.Permission.Builder, io.envoyproxy.envoy.config.rbac.v3.PermissionOrBuilder> permissionsBuilder_;
/**
*
* Required. The set of permissions that define a role. Each permission is
* matched with OR semantics. To match all actions for this policy, a single
* Permission with the ``any`` field set to true should be used.
*
*
* repeated .envoy.config.rbac.v3.Permission permissions = 1 [(.validate.rules) = { ... }
*/
public java.util.List getPermissionsList() {
if (permissionsBuilder_ == null) {
return java.util.Collections.unmodifiableList(permissions_);
} else {
return permissionsBuilder_.getMessageList();
}
}
/**
*
* Required. The set of permissions that define a role. Each permission is
* matched with OR semantics. To match all actions for this policy, a single
* Permission with the ``any`` field set to true should be used.
*
*
* repeated .envoy.config.rbac.v3.Permission permissions = 1 [(.validate.rules) = { ... }
*/
public int getPermissionsCount() {
if (permissionsBuilder_ == null) {
return permissions_.size();
} else {
return permissionsBuilder_.getCount();
}
}
/**
*
* Required. The set of permissions that define a role. Each permission is
* matched with OR semantics. To match all actions for this policy, a single
* Permission with the ``any`` field set to true should be used.
*
*
* repeated .envoy.config.rbac.v3.Permission permissions = 1 [(.validate.rules) = { ... }
*/
public io.envoyproxy.envoy.config.rbac.v3.Permission getPermissions(int index) {
if (permissionsBuilder_ == null) {
return permissions_.get(index);
} else {
return permissionsBuilder_.getMessage(index);
}
}
/**
*
* Required. The set of permissions that define a role. Each permission is
* matched with OR semantics. To match all actions for this policy, a single
* Permission with the ``any`` field set to true should be used.
*
*
* repeated .envoy.config.rbac.v3.Permission permissions = 1 [(.validate.rules) = { ... }
*/
public Builder setPermissions(
int index, io.envoyproxy.envoy.config.rbac.v3.Permission value) {
if (permissionsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensurePermissionsIsMutable();
permissions_.set(index, value);
onChanged();
} else {
permissionsBuilder_.setMessage(index, value);
}
return this;
}
/**
*
* Required. The set of permissions that define a role. Each permission is
* matched with OR semantics. To match all actions for this policy, a single
* Permission with the ``any`` field set to true should be used.
*
*
* repeated .envoy.config.rbac.v3.Permission permissions = 1 [(.validate.rules) = { ... }
*/
public Builder setPermissions(
int index, io.envoyproxy.envoy.config.rbac.v3.Permission.Builder builderForValue) {
if (permissionsBuilder_ == null) {
ensurePermissionsIsMutable();
permissions_.set(index, builderForValue.build());
onChanged();
} else {
permissionsBuilder_.setMessage(index, builderForValue.build());
}
return this;
}
/**
*
* Required. The set of permissions that define a role. Each permission is
* matched with OR semantics. To match all actions for this policy, a single
* Permission with the ``any`` field set to true should be used.
*
*
* repeated .envoy.config.rbac.v3.Permission permissions = 1 [(.validate.rules) = { ... }
*/
public Builder addPermissions(io.envoyproxy.envoy.config.rbac.v3.Permission value) {
if (permissionsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensurePermissionsIsMutable();
permissions_.add(value);
onChanged();
} else {
permissionsBuilder_.addMessage(value);
}
return this;
}
/**
*
* Required. The set of permissions that define a role. Each permission is
* matched with OR semantics. To match all actions for this policy, a single
* Permission with the ``any`` field set to true should be used.
*
*
* repeated .envoy.config.rbac.v3.Permission permissions = 1 [(.validate.rules) = { ... }
*/
public Builder addPermissions(
int index, io.envoyproxy.envoy.config.rbac.v3.Permission value) {
if (permissionsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensurePermissionsIsMutable();
permissions_.add(index, value);
onChanged();
} else {
permissionsBuilder_.addMessage(index, value);
}
return this;
}
/**
*
* Required. The set of permissions that define a role. Each permission is
* matched with OR semantics. To match all actions for this policy, a single
* Permission with the ``any`` field set to true should be used.
*
*
* repeated .envoy.config.rbac.v3.Permission permissions = 1 [(.validate.rules) = { ... }
*/
public Builder addPermissions(
io.envoyproxy.envoy.config.rbac.v3.Permission.Builder builderForValue) {
if (permissionsBuilder_ == null) {
ensurePermissionsIsMutable();
permissions_.add(builderForValue.build());
onChanged();
} else {
permissionsBuilder_.addMessage(builderForValue.build());
}
return this;
}
/**
*
* Required. The set of permissions that define a role. Each permission is
* matched with OR semantics. To match all actions for this policy, a single
* Permission with the ``any`` field set to true should be used.
*
*
* repeated .envoy.config.rbac.v3.Permission permissions = 1 [(.validate.rules) = { ... }
*/
public Builder addPermissions(
int index, io.envoyproxy.envoy.config.rbac.v3.Permission.Builder builderForValue) {
if (permissionsBuilder_ == null) {
ensurePermissionsIsMutable();
permissions_.add(index, builderForValue.build());
onChanged();
} else {
permissionsBuilder_.addMessage(index, builderForValue.build());
}
return this;
}
/**
*
* Required. The set of permissions that define a role. Each permission is
* matched with OR semantics. To match all actions for this policy, a single
* Permission with the ``any`` field set to true should be used.
*
*
* repeated .envoy.config.rbac.v3.Permission permissions = 1 [(.validate.rules) = { ... }
*/
public Builder addAllPermissions(
java.lang.Iterable extends io.envoyproxy.envoy.config.rbac.v3.Permission> values) {
if (permissionsBuilder_ == null) {
ensurePermissionsIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, permissions_);
onChanged();
} else {
permissionsBuilder_.addAllMessages(values);
}
return this;
}
/**
*
* Required. The set of permissions that define a role. Each permission is
* matched with OR semantics. To match all actions for this policy, a single
* Permission with the ``any`` field set to true should be used.
*
*
* repeated .envoy.config.rbac.v3.Permission permissions = 1 [(.validate.rules) = { ... }
*/
public Builder clearPermissions() {
if (permissionsBuilder_ == null) {
permissions_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000001);
onChanged();
} else {
permissionsBuilder_.clear();
}
return this;
}
/**
*
* Required. The set of permissions that define a role. Each permission is
* matched with OR semantics. To match all actions for this policy, a single
* Permission with the ``any`` field set to true should be used.
*
*
* repeated .envoy.config.rbac.v3.Permission permissions = 1 [(.validate.rules) = { ... }
*/
public Builder removePermissions(int index) {
if (permissionsBuilder_ == null) {
ensurePermissionsIsMutable();
permissions_.remove(index);
onChanged();
} else {
permissionsBuilder_.remove(index);
}
return this;
}
/**
*
* Required. The set of permissions that define a role. Each permission is
* matched with OR semantics. To match all actions for this policy, a single
* Permission with the ``any`` field set to true should be used.
*
*
* repeated .envoy.config.rbac.v3.Permission permissions = 1 [(.validate.rules) = { ... }
*/
public io.envoyproxy.envoy.config.rbac.v3.Permission.Builder getPermissionsBuilder(
int index) {
return getPermissionsFieldBuilder().getBuilder(index);
}
/**
*
* Required. The set of permissions that define a role. Each permission is
* matched with OR semantics. To match all actions for this policy, a single
* Permission with the ``any`` field set to true should be used.
*
*
* repeated .envoy.config.rbac.v3.Permission permissions = 1 [(.validate.rules) = { ... }
*/
public io.envoyproxy.envoy.config.rbac.v3.PermissionOrBuilder getPermissionsOrBuilder(
int index) {
if (permissionsBuilder_ == null) {
return permissions_.get(index); } else {
return permissionsBuilder_.getMessageOrBuilder(index);
}
}
/**
*
* Required. The set of permissions that define a role. Each permission is
* matched with OR semantics. To match all actions for this policy, a single
* Permission with the ``any`` field set to true should be used.
*
*
* repeated .envoy.config.rbac.v3.Permission permissions = 1 [(.validate.rules) = { ... }
*/
public java.util.List extends io.envoyproxy.envoy.config.rbac.v3.PermissionOrBuilder>
getPermissionsOrBuilderList() {
if (permissionsBuilder_ != null) {
return permissionsBuilder_.getMessageOrBuilderList();
} else {
return java.util.Collections.unmodifiableList(permissions_);
}
}
/**
*
* Required. The set of permissions that define a role. Each permission is
* matched with OR semantics. To match all actions for this policy, a single
* Permission with the ``any`` field set to true should be used.
*
*
* repeated .envoy.config.rbac.v3.Permission permissions = 1 [(.validate.rules) = { ... }
*/
public io.envoyproxy.envoy.config.rbac.v3.Permission.Builder addPermissionsBuilder() {
return getPermissionsFieldBuilder().addBuilder(
io.envoyproxy.envoy.config.rbac.v3.Permission.getDefaultInstance());
}
/**
*
* Required. The set of permissions that define a role. Each permission is
* matched with OR semantics. To match all actions for this policy, a single
* Permission with the ``any`` field set to true should be used.
*
*
* repeated .envoy.config.rbac.v3.Permission permissions = 1 [(.validate.rules) = { ... }
*/
public io.envoyproxy.envoy.config.rbac.v3.Permission.Builder addPermissionsBuilder(
int index) {
return getPermissionsFieldBuilder().addBuilder(
index, io.envoyproxy.envoy.config.rbac.v3.Permission.getDefaultInstance());
}
/**
*
* Required. The set of permissions that define a role. Each permission is
* matched with OR semantics. To match all actions for this policy, a single
* Permission with the ``any`` field set to true should be used.
*
*
* repeated .envoy.config.rbac.v3.Permission permissions = 1 [(.validate.rules) = { ... }
*/
public java.util.List
getPermissionsBuilderList() {
return getPermissionsFieldBuilder().getBuilderList();
}
private com.google.protobuf.RepeatedFieldBuilderV3<
io.envoyproxy.envoy.config.rbac.v3.Permission, io.envoyproxy.envoy.config.rbac.v3.Permission.Builder, io.envoyproxy.envoy.config.rbac.v3.PermissionOrBuilder>
getPermissionsFieldBuilder() {
if (permissionsBuilder_ == null) {
permissionsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
io.envoyproxy.envoy.config.rbac.v3.Permission, io.envoyproxy.envoy.config.rbac.v3.Permission.Builder, io.envoyproxy.envoy.config.rbac.v3.PermissionOrBuilder>(
permissions_,
((bitField0_ & 0x00000001) != 0),
getParentForChildren(),
isClean());
permissions_ = null;
}
return permissionsBuilder_;
}
private java.util.List principals_ =
java.util.Collections.emptyList();
private void ensurePrincipalsIsMutable() {
if (!((bitField0_ & 0x00000002) != 0)) {
principals_ = new java.util.ArrayList(principals_);
bitField0_ |= 0x00000002;
}
}
private com.google.protobuf.RepeatedFieldBuilderV3<
io.envoyproxy.envoy.config.rbac.v3.Principal, io.envoyproxy.envoy.config.rbac.v3.Principal.Builder, io.envoyproxy.envoy.config.rbac.v3.PrincipalOrBuilder> principalsBuilder_;
/**
*
* Required. The set of principals that are assigned/denied the role based on
* “action”. Each principal is matched with OR semantics. To match all
* downstreams for this policy, a single Principal with the ``any`` field set to
* true should be used.
*
*
* repeated .envoy.config.rbac.v3.Principal principals = 2 [(.validate.rules) = { ... }
*/
public java.util.List getPrincipalsList() {
if (principalsBuilder_ == null) {
return java.util.Collections.unmodifiableList(principals_);
} else {
return principalsBuilder_.getMessageList();
}
}
/**
*
* Required. The set of principals that are assigned/denied the role based on
* “action”. Each principal is matched with OR semantics. To match all
* downstreams for this policy, a single Principal with the ``any`` field set to
* true should be used.
*
*
* repeated .envoy.config.rbac.v3.Principal principals = 2 [(.validate.rules) = { ... }
*/
public int getPrincipalsCount() {
if (principalsBuilder_ == null) {
return principals_.size();
} else {
return principalsBuilder_.getCount();
}
}
/**
*
* Required. The set of principals that are assigned/denied the role based on
* “action”. Each principal is matched with OR semantics. To match all
* downstreams for this policy, a single Principal with the ``any`` field set to
* true should be used.
*
*
* repeated .envoy.config.rbac.v3.Principal principals = 2 [(.validate.rules) = { ... }
*/
public io.envoyproxy.envoy.config.rbac.v3.Principal getPrincipals(int index) {
if (principalsBuilder_ == null) {
return principals_.get(index);
} else {
return principalsBuilder_.getMessage(index);
}
}
/**
*
* Required. The set of principals that are assigned/denied the role based on
* “action”. Each principal is matched with OR semantics. To match all
* downstreams for this policy, a single Principal with the ``any`` field set to
* true should be used.
*
*
* repeated .envoy.config.rbac.v3.Principal principals = 2 [(.validate.rules) = { ... }
*/
public Builder setPrincipals(
int index, io.envoyproxy.envoy.config.rbac.v3.Principal value) {
if (principalsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensurePrincipalsIsMutable();
principals_.set(index, value);
onChanged();
} else {
principalsBuilder_.setMessage(index, value);
}
return this;
}
/**
*
* Required. The set of principals that are assigned/denied the role based on
* “action”. Each principal is matched with OR semantics. To match all
* downstreams for this policy, a single Principal with the ``any`` field set to
* true should be used.
*
*
* repeated .envoy.config.rbac.v3.Principal principals = 2 [(.validate.rules) = { ... }
*/
public Builder setPrincipals(
int index, io.envoyproxy.envoy.config.rbac.v3.Principal.Builder builderForValue) {
if (principalsBuilder_ == null) {
ensurePrincipalsIsMutable();
principals_.set(index, builderForValue.build());
onChanged();
} else {
principalsBuilder_.setMessage(index, builderForValue.build());
}
return this;
}
/**
*
* Required. The set of principals that are assigned/denied the role based on
* “action”. Each principal is matched with OR semantics. To match all
* downstreams for this policy, a single Principal with the ``any`` field set to
* true should be used.
*
*
* repeated .envoy.config.rbac.v3.Principal principals = 2 [(.validate.rules) = { ... }
*/
public Builder addPrincipals(io.envoyproxy.envoy.config.rbac.v3.Principal value) {
if (principalsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensurePrincipalsIsMutable();
principals_.add(value);
onChanged();
} else {
principalsBuilder_.addMessage(value);
}
return this;
}
/**
*
* Required. The set of principals that are assigned/denied the role based on
* “action”. Each principal is matched with OR semantics. To match all
* downstreams for this policy, a single Principal with the ``any`` field set to
* true should be used.
*
*
* repeated .envoy.config.rbac.v3.Principal principals = 2 [(.validate.rules) = { ... }
*/
public Builder addPrincipals(
int index, io.envoyproxy.envoy.config.rbac.v3.Principal value) {
if (principalsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensurePrincipalsIsMutable();
principals_.add(index, value);
onChanged();
} else {
principalsBuilder_.addMessage(index, value);
}
return this;
}
/**
*
* Required. The set of principals that are assigned/denied the role based on
* “action”. Each principal is matched with OR semantics. To match all
* downstreams for this policy, a single Principal with the ``any`` field set to
* true should be used.
*
*
* repeated .envoy.config.rbac.v3.Principal principals = 2 [(.validate.rules) = { ... }
*/
public Builder addPrincipals(
io.envoyproxy.envoy.config.rbac.v3.Principal.Builder builderForValue) {
if (principalsBuilder_ == null) {
ensurePrincipalsIsMutable();
principals_.add(builderForValue.build());
onChanged();
} else {
principalsBuilder_.addMessage(builderForValue.build());
}
return this;
}
/**
*
* Required. The set of principals that are assigned/denied the role based on
* “action”. Each principal is matched with OR semantics. To match all
* downstreams for this policy, a single Principal with the ``any`` field set to
* true should be used.
*
*
* repeated .envoy.config.rbac.v3.Principal principals = 2 [(.validate.rules) = { ... }
*/
public Builder addPrincipals(
int index, io.envoyproxy.envoy.config.rbac.v3.Principal.Builder builderForValue) {
if (principalsBuilder_ == null) {
ensurePrincipalsIsMutable();
principals_.add(index, builderForValue.build());
onChanged();
} else {
principalsBuilder_.addMessage(index, builderForValue.build());
}
return this;
}
/**
*
* Required. The set of principals that are assigned/denied the role based on
* “action”. Each principal is matched with OR semantics. To match all
* downstreams for this policy, a single Principal with the ``any`` field set to
* true should be used.
*
*
* repeated .envoy.config.rbac.v3.Principal principals = 2 [(.validate.rules) = { ... }
*/
public Builder addAllPrincipals(
java.lang.Iterable extends io.envoyproxy.envoy.config.rbac.v3.Principal> values) {
if (principalsBuilder_ == null) {
ensurePrincipalsIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, principals_);
onChanged();
} else {
principalsBuilder_.addAllMessages(values);
}
return this;
}
/**
*
* Required. The set of principals that are assigned/denied the role based on
* “action”. Each principal is matched with OR semantics. To match all
* downstreams for this policy, a single Principal with the ``any`` field set to
* true should be used.
*
*
* repeated .envoy.config.rbac.v3.Principal principals = 2 [(.validate.rules) = { ... }
*/
public Builder clearPrincipals() {
if (principalsBuilder_ == null) {
principals_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000002);
onChanged();
} else {
principalsBuilder_.clear();
}
return this;
}
/**
*
* Required. The set of principals that are assigned/denied the role based on
* “action”. Each principal is matched with OR semantics. To match all
* downstreams for this policy, a single Principal with the ``any`` field set to
* true should be used.
*
*
* repeated .envoy.config.rbac.v3.Principal principals = 2 [(.validate.rules) = { ... }
*/
public Builder removePrincipals(int index) {
if (principalsBuilder_ == null) {
ensurePrincipalsIsMutable();
principals_.remove(index);
onChanged();
} else {
principalsBuilder_.remove(index);
}
return this;
}
/**
*
* Required. The set of principals that are assigned/denied the role based on
* “action”. Each principal is matched with OR semantics. To match all
* downstreams for this policy, a single Principal with the ``any`` field set to
* true should be used.
*
*
* repeated .envoy.config.rbac.v3.Principal principals = 2 [(.validate.rules) = { ... }
*/
public io.envoyproxy.envoy.config.rbac.v3.Principal.Builder getPrincipalsBuilder(
int index) {
return getPrincipalsFieldBuilder().getBuilder(index);
}
/**
*
* Required. The set of principals that are assigned/denied the role based on
* “action”. Each principal is matched with OR semantics. To match all
* downstreams for this policy, a single Principal with the ``any`` field set to
* true should be used.
*
*
* repeated .envoy.config.rbac.v3.Principal principals = 2 [(.validate.rules) = { ... }
*/
public io.envoyproxy.envoy.config.rbac.v3.PrincipalOrBuilder getPrincipalsOrBuilder(
int index) {
if (principalsBuilder_ == null) {
return principals_.get(index); } else {
return principalsBuilder_.getMessageOrBuilder(index);
}
}
/**
*
* Required. The set of principals that are assigned/denied the role based on
* “action”. Each principal is matched with OR semantics. To match all
* downstreams for this policy, a single Principal with the ``any`` field set to
* true should be used.
*
*
* repeated .envoy.config.rbac.v3.Principal principals = 2 [(.validate.rules) = { ... }
*/
public java.util.List extends io.envoyproxy.envoy.config.rbac.v3.PrincipalOrBuilder>
getPrincipalsOrBuilderList() {
if (principalsBuilder_ != null) {
return principalsBuilder_.getMessageOrBuilderList();
} else {
return java.util.Collections.unmodifiableList(principals_);
}
}
/**
*
* Required. The set of principals that are assigned/denied the role based on
* “action”. Each principal is matched with OR semantics. To match all
* downstreams for this policy, a single Principal with the ``any`` field set to
* true should be used.
*
*
* repeated .envoy.config.rbac.v3.Principal principals = 2 [(.validate.rules) = { ... }
*/
public io.envoyproxy.envoy.config.rbac.v3.Principal.Builder addPrincipalsBuilder() {
return getPrincipalsFieldBuilder().addBuilder(
io.envoyproxy.envoy.config.rbac.v3.Principal.getDefaultInstance());
}
/**
*
* Required. The set of principals that are assigned/denied the role based on
* “action”. Each principal is matched with OR semantics. To match all
* downstreams for this policy, a single Principal with the ``any`` field set to
* true should be used.
*
*
* repeated .envoy.config.rbac.v3.Principal principals = 2 [(.validate.rules) = { ... }
*/
public io.envoyproxy.envoy.config.rbac.v3.Principal.Builder addPrincipalsBuilder(
int index) {
return getPrincipalsFieldBuilder().addBuilder(
index, io.envoyproxy.envoy.config.rbac.v3.Principal.getDefaultInstance());
}
/**
*
* Required. The set of principals that are assigned/denied the role based on
* “action”. Each principal is matched with OR semantics. To match all
* downstreams for this policy, a single Principal with the ``any`` field set to
* true should be used.
*
*
* repeated .envoy.config.rbac.v3.Principal principals = 2 [(.validate.rules) = { ... }
*/
public java.util.List
getPrincipalsBuilderList() {
return getPrincipalsFieldBuilder().getBuilderList();
}
private com.google.protobuf.RepeatedFieldBuilderV3<
io.envoyproxy.envoy.config.rbac.v3.Principal, io.envoyproxy.envoy.config.rbac.v3.Principal.Builder, io.envoyproxy.envoy.config.rbac.v3.PrincipalOrBuilder>
getPrincipalsFieldBuilder() {
if (principalsBuilder_ == null) {
principalsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
io.envoyproxy.envoy.config.rbac.v3.Principal, io.envoyproxy.envoy.config.rbac.v3.Principal.Builder, io.envoyproxy.envoy.config.rbac.v3.PrincipalOrBuilder>(
principals_,
((bitField0_ & 0x00000002) != 0),
getParentForChildren(),
isClean());
principals_ = null;
}
return principalsBuilder_;
}
private com.google.api.expr.v1alpha1.Expr condition_;
private com.google.protobuf.SingleFieldBuilderV3<
com.google.api.expr.v1alpha1.Expr, com.google.api.expr.v1alpha1.Expr.Builder, com.google.api.expr.v1alpha1.ExprOrBuilder> conditionBuilder_;
/**
*
* An optional symbolic expression specifying an access control
* :ref:`condition <arch_overview_condition>`. The condition is combined
* with the permissions and the principals as a clause with AND semantics.
* Only be used when checked_condition is not used.
*
*
* .google.api.expr.v1alpha1.Expr condition = 3 [(.udpa.annotations.field_migrate) = { ... }
* @return Whether the condition field is set.
*/
public boolean hasCondition() {
return ((bitField0_ & 0x00000004) != 0);
}
/**
*
* An optional symbolic expression specifying an access control
* :ref:`condition <arch_overview_condition>`. The condition is combined
* with the permissions and the principals as a clause with AND semantics.
* Only be used when checked_condition is not used.
*
*
* .google.api.expr.v1alpha1.Expr condition = 3 [(.udpa.annotations.field_migrate) = { ... }
* @return The condition.
*/
public com.google.api.expr.v1alpha1.Expr getCondition() {
if (conditionBuilder_ == null) {
return condition_ == null ? com.google.api.expr.v1alpha1.Expr.getDefaultInstance() : condition_;
} else {
return conditionBuilder_.getMessage();
}
}
/**
*
* An optional symbolic expression specifying an access control
* :ref:`condition <arch_overview_condition>`. The condition is combined
* with the permissions and the principals as a clause with AND semantics.
* Only be used when checked_condition is not used.
*
*
* .google.api.expr.v1alpha1.Expr condition = 3 [(.udpa.annotations.field_migrate) = { ... }
*/
public Builder setCondition(com.google.api.expr.v1alpha1.Expr value) {
if (conditionBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
condition_ = value;
} else {
conditionBuilder_.setMessage(value);
}
bitField0_ |= 0x00000004;
onChanged();
return this;
}
/**
*
* An optional symbolic expression specifying an access control
* :ref:`condition <arch_overview_condition>`. The condition is combined
* with the permissions and the principals as a clause with AND semantics.
* Only be used when checked_condition is not used.
*
*
* .google.api.expr.v1alpha1.Expr condition = 3 [(.udpa.annotations.field_migrate) = { ... }
*/
public Builder setCondition(
com.google.api.expr.v1alpha1.Expr.Builder builderForValue) {
if (conditionBuilder_ == null) {
condition_ = builderForValue.build();
} else {
conditionBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000004;
onChanged();
return this;
}
/**
*
* An optional symbolic expression specifying an access control
* :ref:`condition <arch_overview_condition>`. The condition is combined
* with the permissions and the principals as a clause with AND semantics.
* Only be used when checked_condition is not used.
*
*
* .google.api.expr.v1alpha1.Expr condition = 3 [(.udpa.annotations.field_migrate) = { ... }
*/
public Builder mergeCondition(com.google.api.expr.v1alpha1.Expr value) {
if (conditionBuilder_ == null) {
if (((bitField0_ & 0x00000004) != 0) &&
condition_ != null &&
condition_ != com.google.api.expr.v1alpha1.Expr.getDefaultInstance()) {
getConditionBuilder().mergeFrom(value);
} else {
condition_ = value;
}
} else {
conditionBuilder_.mergeFrom(value);
}
if (condition_ != null) {
bitField0_ |= 0x00000004;
onChanged();
}
return this;
}
/**
*
* An optional symbolic expression specifying an access control
* :ref:`condition <arch_overview_condition>`. The condition is combined
* with the permissions and the principals as a clause with AND semantics.
* Only be used when checked_condition is not used.
*
*
* .google.api.expr.v1alpha1.Expr condition = 3 [(.udpa.annotations.field_migrate) = { ... }
*/
public Builder clearCondition() {
bitField0_ = (bitField0_ & ~0x00000004);
condition_ = null;
if (conditionBuilder_ != null) {
conditionBuilder_.dispose();
conditionBuilder_ = null;
}
onChanged();
return this;
}
/**
*
* An optional symbolic expression specifying an access control
* :ref:`condition <arch_overview_condition>`. The condition is combined
* with the permissions and the principals as a clause with AND semantics.
* Only be used when checked_condition is not used.
*
*
* .google.api.expr.v1alpha1.Expr condition = 3 [(.udpa.annotations.field_migrate) = { ... }
*/
public com.google.api.expr.v1alpha1.Expr.Builder getConditionBuilder() {
bitField0_ |= 0x00000004;
onChanged();
return getConditionFieldBuilder().getBuilder();
}
/**
*
* An optional symbolic expression specifying an access control
* :ref:`condition <arch_overview_condition>`. The condition is combined
* with the permissions and the principals as a clause with AND semantics.
* Only be used when checked_condition is not used.
*
*
* .google.api.expr.v1alpha1.Expr condition = 3 [(.udpa.annotations.field_migrate) = { ... }
*/
public com.google.api.expr.v1alpha1.ExprOrBuilder getConditionOrBuilder() {
if (conditionBuilder_ != null) {
return conditionBuilder_.getMessageOrBuilder();
} else {
return condition_ == null ?
com.google.api.expr.v1alpha1.Expr.getDefaultInstance() : condition_;
}
}
/**
*
* An optional symbolic expression specifying an access control
* :ref:`condition <arch_overview_condition>`. The condition is combined
* with the permissions and the principals as a clause with AND semantics.
* Only be used when checked_condition is not used.
*
*
* .google.api.expr.v1alpha1.Expr condition = 3 [(.udpa.annotations.field_migrate) = { ... }
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.api.expr.v1alpha1.Expr, com.google.api.expr.v1alpha1.Expr.Builder, com.google.api.expr.v1alpha1.ExprOrBuilder>
getConditionFieldBuilder() {
if (conditionBuilder_ == null) {
conditionBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.google.api.expr.v1alpha1.Expr, com.google.api.expr.v1alpha1.Expr.Builder, com.google.api.expr.v1alpha1.ExprOrBuilder>(
getCondition(),
getParentForChildren(),
isClean());
condition_ = null;
}
return conditionBuilder_;
}
private com.google.api.expr.v1alpha1.CheckedExpr checkedCondition_;
private com.google.protobuf.SingleFieldBuilderV3<
com.google.api.expr.v1alpha1.CheckedExpr, com.google.api.expr.v1alpha1.CheckedExpr.Builder, com.google.api.expr.v1alpha1.CheckedExprOrBuilder> checkedConditionBuilder_;
/**
*
* [#not-implemented-hide:]
* An optional symbolic expression that has been successfully type checked.
* Only be used when condition is not used.
*
*
* .google.api.expr.v1alpha1.CheckedExpr checked_condition = 4 [(.udpa.annotations.field_migrate) = { ... }
* @return Whether the checkedCondition field is set.
*/
public boolean hasCheckedCondition() {
return ((bitField0_ & 0x00000008) != 0);
}
/**
*
* [#not-implemented-hide:]
* An optional symbolic expression that has been successfully type checked.
* Only be used when condition is not used.
*
*
* .google.api.expr.v1alpha1.CheckedExpr checked_condition = 4 [(.udpa.annotations.field_migrate) = { ... }
* @return The checkedCondition.
*/
public com.google.api.expr.v1alpha1.CheckedExpr getCheckedCondition() {
if (checkedConditionBuilder_ == null) {
return checkedCondition_ == null ? com.google.api.expr.v1alpha1.CheckedExpr.getDefaultInstance() : checkedCondition_;
} else {
return checkedConditionBuilder_.getMessage();
}
}
/**
*
* [#not-implemented-hide:]
* An optional symbolic expression that has been successfully type checked.
* Only be used when condition is not used.
*
*
* .google.api.expr.v1alpha1.CheckedExpr checked_condition = 4 [(.udpa.annotations.field_migrate) = { ... }
*/
public Builder setCheckedCondition(com.google.api.expr.v1alpha1.CheckedExpr value) {
if (checkedConditionBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
checkedCondition_ = value;
} else {
checkedConditionBuilder_.setMessage(value);
}
bitField0_ |= 0x00000008;
onChanged();
return this;
}
/**
*
* [#not-implemented-hide:]
* An optional symbolic expression that has been successfully type checked.
* Only be used when condition is not used.
*
*
* .google.api.expr.v1alpha1.CheckedExpr checked_condition = 4 [(.udpa.annotations.field_migrate) = { ... }
*/
public Builder setCheckedCondition(
com.google.api.expr.v1alpha1.CheckedExpr.Builder builderForValue) {
if (checkedConditionBuilder_ == null) {
checkedCondition_ = builderForValue.build();
} else {
checkedConditionBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000008;
onChanged();
return this;
}
/**
*
* [#not-implemented-hide:]
* An optional symbolic expression that has been successfully type checked.
* Only be used when condition is not used.
*
*
* .google.api.expr.v1alpha1.CheckedExpr checked_condition = 4 [(.udpa.annotations.field_migrate) = { ... }
*/
public Builder mergeCheckedCondition(com.google.api.expr.v1alpha1.CheckedExpr value) {
if (checkedConditionBuilder_ == null) {
if (((bitField0_ & 0x00000008) != 0) &&
checkedCondition_ != null &&
checkedCondition_ != com.google.api.expr.v1alpha1.CheckedExpr.getDefaultInstance()) {
getCheckedConditionBuilder().mergeFrom(value);
} else {
checkedCondition_ = value;
}
} else {
checkedConditionBuilder_.mergeFrom(value);
}
if (checkedCondition_ != null) {
bitField0_ |= 0x00000008;
onChanged();
}
return this;
}
/**
*
* [#not-implemented-hide:]
* An optional symbolic expression that has been successfully type checked.
* Only be used when condition is not used.
*
*
* .google.api.expr.v1alpha1.CheckedExpr checked_condition = 4 [(.udpa.annotations.field_migrate) = { ... }
*/
public Builder clearCheckedCondition() {
bitField0_ = (bitField0_ & ~0x00000008);
checkedCondition_ = null;
if (checkedConditionBuilder_ != null) {
checkedConditionBuilder_.dispose();
checkedConditionBuilder_ = null;
}
onChanged();
return this;
}
/**
*
* [#not-implemented-hide:]
* An optional symbolic expression that has been successfully type checked.
* Only be used when condition is not used.
*
*
* .google.api.expr.v1alpha1.CheckedExpr checked_condition = 4 [(.udpa.annotations.field_migrate) = { ... }
*/
public com.google.api.expr.v1alpha1.CheckedExpr.Builder getCheckedConditionBuilder() {
bitField0_ |= 0x00000008;
onChanged();
return getCheckedConditionFieldBuilder().getBuilder();
}
/**
*
* [#not-implemented-hide:]
* An optional symbolic expression that has been successfully type checked.
* Only be used when condition is not used.
*
*
* .google.api.expr.v1alpha1.CheckedExpr checked_condition = 4 [(.udpa.annotations.field_migrate) = { ... }
*/
public com.google.api.expr.v1alpha1.CheckedExprOrBuilder getCheckedConditionOrBuilder() {
if (checkedConditionBuilder_ != null) {
return checkedConditionBuilder_.getMessageOrBuilder();
} else {
return checkedCondition_ == null ?
com.google.api.expr.v1alpha1.CheckedExpr.getDefaultInstance() : checkedCondition_;
}
}
/**
*
* [#not-implemented-hide:]
* An optional symbolic expression that has been successfully type checked.
* Only be used when condition is not used.
*
*
* .google.api.expr.v1alpha1.CheckedExpr checked_condition = 4 [(.udpa.annotations.field_migrate) = { ... }
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.api.expr.v1alpha1.CheckedExpr, com.google.api.expr.v1alpha1.CheckedExpr.Builder, com.google.api.expr.v1alpha1.CheckedExprOrBuilder>
getCheckedConditionFieldBuilder() {
if (checkedConditionBuilder_ == null) {
checkedConditionBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.google.api.expr.v1alpha1.CheckedExpr, com.google.api.expr.v1alpha1.CheckedExpr.Builder, com.google.api.expr.v1alpha1.CheckedExprOrBuilder>(
getCheckedCondition(),
getParentForChildren(),
isClean());
checkedCondition_ = null;
}
return checkedConditionBuilder_;
}
@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.Policy)
}
// @@protoc_insertion_point(class_scope:envoy.config.rbac.v3.Policy)
private static final io.envoyproxy.envoy.config.rbac.v3.Policy DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new io.envoyproxy.envoy.config.rbac.v3.Policy();
}
public static io.envoyproxy.envoy.config.rbac.v3.Policy getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public Policy 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.Policy getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy