
io.envoyproxy.envoy.config.rbac.v2alpha.Policy Maven / Gradle / Ivy
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: envoy/config/rbac/v2alpha/rbac.proto
package io.envoyproxy.envoy.config.rbac.v2alpha;
/**
*
* 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.
*
*
* Protobuf type {@code envoy.config.rbac.v2alpha.Policy}
*/
public final class Policy extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:envoy.config.rbac.v2alpha.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
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private Policy(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
int mutable_bitField0_ = 0;
com.google.protobuf.UnknownFieldSet.Builder unknownFields =
com.google.protobuf.UnknownFieldSet.newBuilder();
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
default: {
if (!parseUnknownFieldProto3(
input, unknownFields, extensionRegistry, tag)) {
done = true;
}
break;
}
case 10: {
if (!((mutable_bitField0_ & 0x00000001) == 0x00000001)) {
permissions_ = new java.util.ArrayList();
mutable_bitField0_ |= 0x00000001;
}
permissions_.add(
input.readMessage(io.envoyproxy.envoy.config.rbac.v2alpha.Permission.parser(), extensionRegistry));
break;
}
case 18: {
if (!((mutable_bitField0_ & 0x00000002) == 0x00000002)) {
principals_ = new java.util.ArrayList();
mutable_bitField0_ |= 0x00000002;
}
principals_.add(
input.readMessage(io.envoyproxy.envoy.config.rbac.v2alpha.Principal.parser(), extensionRegistry));
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 {
if (((mutable_bitField0_ & 0x00000001) == 0x00000001)) {
permissions_ = java.util.Collections.unmodifiableList(permissions_);
}
if (((mutable_bitField0_ & 0x00000002) == 0x00000002)) {
principals_ = java.util.Collections.unmodifiableList(principals_);
}
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return io.envoyproxy.envoy.config.rbac.v2alpha.RbacProto.internal_static_envoy_config_rbac_v2alpha_Policy_descriptor;
}
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return io.envoyproxy.envoy.config.rbac.v2alpha.RbacProto.internal_static_envoy_config_rbac_v2alpha_Policy_fieldAccessorTable
.ensureFieldAccessorsInitialized(
io.envoyproxy.envoy.config.rbac.v2alpha.Policy.class, io.envoyproxy.envoy.config.rbac.v2alpha.Policy.Builder.class);
}
public static final int PERMISSIONS_FIELD_NUMBER = 1;
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.v2alpha.Permission permissions = 1 [(.validate.rules) = { ... }
*/
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.v2alpha.Permission permissions = 1 [(.validate.rules) = { ... }
*/
public java.util.List extends io.envoyproxy.envoy.config.rbac.v2alpha.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.v2alpha.Permission permissions = 1 [(.validate.rules) = { ... }
*/
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.v2alpha.Permission permissions = 1 [(.validate.rules) = { ... }
*/
public io.envoyproxy.envoy.config.rbac.v2alpha.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.v2alpha.Permission permissions = 1 [(.validate.rules) = { ... }
*/
public io.envoyproxy.envoy.config.rbac.v2alpha.PermissionOrBuilder getPermissionsOrBuilder(
int index) {
return permissions_.get(index);
}
public static final int PRINCIPALS_FIELD_NUMBER = 2;
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.v2alpha.Principal principals = 2 [(.validate.rules) = { ... }
*/
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.v2alpha.Principal principals = 2 [(.validate.rules) = { ... }
*/
public java.util.List extends io.envoyproxy.envoy.config.rbac.v2alpha.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.v2alpha.Principal principals = 2 [(.validate.rules) = { ... }
*/
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.v2alpha.Principal principals = 2 [(.validate.rules) = { ... }
*/
public io.envoyproxy.envoy.config.rbac.v2alpha.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.v2alpha.Principal principals = 2 [(.validate.rules) = { ... }
*/
public io.envoyproxy.envoy.config.rbac.v2alpha.PrincipalOrBuilder getPrincipalsOrBuilder(
int index) {
return principals_.get(index);
}
private byte memoizedIsInitialized = -1;
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
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));
}
unknownFields.writeTo(output);
}
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));
}
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.v2alpha.Policy)) {
return super.equals(obj);
}
io.envoyproxy.envoy.config.rbac.v2alpha.Policy other = (io.envoyproxy.envoy.config.rbac.v2alpha.Policy) obj;
boolean result = true;
result = result && getPermissionsList()
.equals(other.getPermissionsList());
result = result && getPrincipalsList()
.equals(other.getPrincipalsList());
result = result && unknownFields.equals(other.unknownFields);
return result;
}
@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();
}
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static io.envoyproxy.envoy.config.rbac.v2alpha.Policy parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.envoyproxy.envoy.config.rbac.v2alpha.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.v2alpha.Policy parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.envoyproxy.envoy.config.rbac.v2alpha.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.v2alpha.Policy parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.envoyproxy.envoy.config.rbac.v2alpha.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.v2alpha.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.v2alpha.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.v2alpha.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.v2alpha.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.v2alpha.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.v2alpha.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);
}
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(io.envoyproxy.envoy.config.rbac.v2alpha.Policy prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
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.
*
*
* Protobuf type {@code envoy.config.rbac.v2alpha.Policy}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:envoy.config.rbac.v2alpha.Policy)
io.envoyproxy.envoy.config.rbac.v2alpha.PolicyOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return io.envoyproxy.envoy.config.rbac.v2alpha.RbacProto.internal_static_envoy_config_rbac_v2alpha_Policy_descriptor;
}
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return io.envoyproxy.envoy.config.rbac.v2alpha.RbacProto.internal_static_envoy_config_rbac_v2alpha_Policy_fieldAccessorTable
.ensureFieldAccessorsInitialized(
io.envoyproxy.envoy.config.rbac.v2alpha.Policy.class, io.envoyproxy.envoy.config.rbac.v2alpha.Policy.Builder.class);
}
// Construct using io.envoyproxy.envoy.config.rbac.v2alpha.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();
}
}
public Builder clear() {
super.clear();
if (permissionsBuilder_ == null) {
permissions_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000001);
} else {
permissionsBuilder_.clear();
}
if (principalsBuilder_ == null) {
principals_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000002);
} else {
principalsBuilder_.clear();
}
return this;
}
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return io.envoyproxy.envoy.config.rbac.v2alpha.RbacProto.internal_static_envoy_config_rbac_v2alpha_Policy_descriptor;
}
public io.envoyproxy.envoy.config.rbac.v2alpha.Policy getDefaultInstanceForType() {
return io.envoyproxy.envoy.config.rbac.v2alpha.Policy.getDefaultInstance();
}
public io.envoyproxy.envoy.config.rbac.v2alpha.Policy build() {
io.envoyproxy.envoy.config.rbac.v2alpha.Policy result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
public io.envoyproxy.envoy.config.rbac.v2alpha.Policy buildPartial() {
io.envoyproxy.envoy.config.rbac.v2alpha.Policy result = new io.envoyproxy.envoy.config.rbac.v2alpha.Policy(this);
int from_bitField0_ = bitField0_;
if (permissionsBuilder_ == null) {
if (((bitField0_ & 0x00000001) == 0x00000001)) {
permissions_ = java.util.Collections.unmodifiableList(permissions_);
bitField0_ = (bitField0_ & ~0x00000001);
}
result.permissions_ = permissions_;
} else {
result.permissions_ = permissionsBuilder_.build();
}
if (principalsBuilder_ == null) {
if (((bitField0_ & 0x00000002) == 0x00000002)) {
principals_ = java.util.Collections.unmodifiableList(principals_);
bitField0_ = (bitField0_ & ~0x00000002);
}
result.principals_ = principals_;
} else {
result.principals_ = principalsBuilder_.build();
}
onBuilt();
return result;
}
public Builder clone() {
return (Builder) super.clone();
}
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return (Builder) super.setField(field, value);
}
public Builder clearField(
com.google.protobuf.Descriptors.FieldDescriptor field) {
return (Builder) super.clearField(field);
}
public Builder clearOneof(
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return (Builder) super.clearOneof(oneof);
}
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index, java.lang.Object value) {
return (Builder) super.setRepeatedField(field, index, value);
}
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return (Builder) super.addRepeatedField(field, value);
}
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof io.envoyproxy.envoy.config.rbac.v2alpha.Policy) {
return mergeFrom((io.envoyproxy.envoy.config.rbac.v2alpha.Policy)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(io.envoyproxy.envoy.config.rbac.v2alpha.Policy other) {
if (other == io.envoyproxy.envoy.config.rbac.v2alpha.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_);
}
}
}
this.mergeUnknownFields(other.unknownFields);
onChanged();
return this;
}
public final boolean isInitialized() {
return true;
}
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
io.envoyproxy.envoy.config.rbac.v2alpha.Policy parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (io.envoyproxy.envoy.config.rbac.v2alpha.Policy) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int bitField0_;
private java.util.List permissions_ =
java.util.Collections.emptyList();
private void ensurePermissionsIsMutable() {
if (!((bitField0_ & 0x00000001) == 0x00000001)) {
permissions_ = new java.util.ArrayList(permissions_);
bitField0_ |= 0x00000001;
}
}
private com.google.protobuf.RepeatedFieldBuilderV3<
io.envoyproxy.envoy.config.rbac.v2alpha.Permission, io.envoyproxy.envoy.config.rbac.v2alpha.Permission.Builder, io.envoyproxy.envoy.config.rbac.v2alpha.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.v2alpha.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.v2alpha.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.v2alpha.Permission permissions = 1 [(.validate.rules) = { ... }
*/
public io.envoyproxy.envoy.config.rbac.v2alpha.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.v2alpha.Permission permissions = 1 [(.validate.rules) = { ... }
*/
public Builder setPermissions(
int index, io.envoyproxy.envoy.config.rbac.v2alpha.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.v2alpha.Permission permissions = 1 [(.validate.rules) = { ... }
*/
public Builder setPermissions(
int index, io.envoyproxy.envoy.config.rbac.v2alpha.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.v2alpha.Permission permissions = 1 [(.validate.rules) = { ... }
*/
public Builder addPermissions(io.envoyproxy.envoy.config.rbac.v2alpha.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.v2alpha.Permission permissions = 1 [(.validate.rules) = { ... }
*/
public Builder addPermissions(
int index, io.envoyproxy.envoy.config.rbac.v2alpha.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.v2alpha.Permission permissions = 1 [(.validate.rules) = { ... }
*/
public Builder addPermissions(
io.envoyproxy.envoy.config.rbac.v2alpha.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.v2alpha.Permission permissions = 1 [(.validate.rules) = { ... }
*/
public Builder addPermissions(
int index, io.envoyproxy.envoy.config.rbac.v2alpha.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.v2alpha.Permission permissions = 1 [(.validate.rules) = { ... }
*/
public Builder addAllPermissions(
java.lang.Iterable extends io.envoyproxy.envoy.config.rbac.v2alpha.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.v2alpha.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.v2alpha.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.v2alpha.Permission permissions = 1 [(.validate.rules) = { ... }
*/
public io.envoyproxy.envoy.config.rbac.v2alpha.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.v2alpha.Permission permissions = 1 [(.validate.rules) = { ... }
*/
public io.envoyproxy.envoy.config.rbac.v2alpha.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.v2alpha.Permission permissions = 1 [(.validate.rules) = { ... }
*/
public java.util.List extends io.envoyproxy.envoy.config.rbac.v2alpha.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.v2alpha.Permission permissions = 1 [(.validate.rules) = { ... }
*/
public io.envoyproxy.envoy.config.rbac.v2alpha.Permission.Builder addPermissionsBuilder() {
return getPermissionsFieldBuilder().addBuilder(
io.envoyproxy.envoy.config.rbac.v2alpha.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.v2alpha.Permission permissions = 1 [(.validate.rules) = { ... }
*/
public io.envoyproxy.envoy.config.rbac.v2alpha.Permission.Builder addPermissionsBuilder(
int index) {
return getPermissionsFieldBuilder().addBuilder(
index, io.envoyproxy.envoy.config.rbac.v2alpha.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.v2alpha.Permission permissions = 1 [(.validate.rules) = { ... }
*/
public java.util.List
getPermissionsBuilderList() {
return getPermissionsFieldBuilder().getBuilderList();
}
private com.google.protobuf.RepeatedFieldBuilderV3<
io.envoyproxy.envoy.config.rbac.v2alpha.Permission, io.envoyproxy.envoy.config.rbac.v2alpha.Permission.Builder, io.envoyproxy.envoy.config.rbac.v2alpha.PermissionOrBuilder>
getPermissionsFieldBuilder() {
if (permissionsBuilder_ == null) {
permissionsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
io.envoyproxy.envoy.config.rbac.v2alpha.Permission, io.envoyproxy.envoy.config.rbac.v2alpha.Permission.Builder, io.envoyproxy.envoy.config.rbac.v2alpha.PermissionOrBuilder>(
permissions_,
((bitField0_ & 0x00000001) == 0x00000001),
getParentForChildren(),
isClean());
permissions_ = null;
}
return permissionsBuilder_;
}
private java.util.List principals_ =
java.util.Collections.emptyList();
private void ensurePrincipalsIsMutable() {
if (!((bitField0_ & 0x00000002) == 0x00000002)) {
principals_ = new java.util.ArrayList(principals_);
bitField0_ |= 0x00000002;
}
}
private com.google.protobuf.RepeatedFieldBuilderV3<
io.envoyproxy.envoy.config.rbac.v2alpha.Principal, io.envoyproxy.envoy.config.rbac.v2alpha.Principal.Builder, io.envoyproxy.envoy.config.rbac.v2alpha.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.v2alpha.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.v2alpha.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.v2alpha.Principal principals = 2 [(.validate.rules) = { ... }
*/
public io.envoyproxy.envoy.config.rbac.v2alpha.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.v2alpha.Principal principals = 2 [(.validate.rules) = { ... }
*/
public Builder setPrincipals(
int index, io.envoyproxy.envoy.config.rbac.v2alpha.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.v2alpha.Principal principals = 2 [(.validate.rules) = { ... }
*/
public Builder setPrincipals(
int index, io.envoyproxy.envoy.config.rbac.v2alpha.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.v2alpha.Principal principals = 2 [(.validate.rules) = { ... }
*/
public Builder addPrincipals(io.envoyproxy.envoy.config.rbac.v2alpha.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.v2alpha.Principal principals = 2 [(.validate.rules) = { ... }
*/
public Builder addPrincipals(
int index, io.envoyproxy.envoy.config.rbac.v2alpha.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.v2alpha.Principal principals = 2 [(.validate.rules) = { ... }
*/
public Builder addPrincipals(
io.envoyproxy.envoy.config.rbac.v2alpha.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.v2alpha.Principal principals = 2 [(.validate.rules) = { ... }
*/
public Builder addPrincipals(
int index, io.envoyproxy.envoy.config.rbac.v2alpha.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.v2alpha.Principal principals = 2 [(.validate.rules) = { ... }
*/
public Builder addAllPrincipals(
java.lang.Iterable extends io.envoyproxy.envoy.config.rbac.v2alpha.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.v2alpha.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.v2alpha.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.v2alpha.Principal principals = 2 [(.validate.rules) = { ... }
*/
public io.envoyproxy.envoy.config.rbac.v2alpha.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.v2alpha.Principal principals = 2 [(.validate.rules) = { ... }
*/
public io.envoyproxy.envoy.config.rbac.v2alpha.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.v2alpha.Principal principals = 2 [(.validate.rules) = { ... }
*/
public java.util.List extends io.envoyproxy.envoy.config.rbac.v2alpha.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.v2alpha.Principal principals = 2 [(.validate.rules) = { ... }
*/
public io.envoyproxy.envoy.config.rbac.v2alpha.Principal.Builder addPrincipalsBuilder() {
return getPrincipalsFieldBuilder().addBuilder(
io.envoyproxy.envoy.config.rbac.v2alpha.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.v2alpha.Principal principals = 2 [(.validate.rules) = { ... }
*/
public io.envoyproxy.envoy.config.rbac.v2alpha.Principal.Builder addPrincipalsBuilder(
int index) {
return getPrincipalsFieldBuilder().addBuilder(
index, io.envoyproxy.envoy.config.rbac.v2alpha.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.v2alpha.Principal principals = 2 [(.validate.rules) = { ... }
*/
public java.util.List
getPrincipalsBuilderList() {
return getPrincipalsFieldBuilder().getBuilderList();
}
private com.google.protobuf.RepeatedFieldBuilderV3<
io.envoyproxy.envoy.config.rbac.v2alpha.Principal, io.envoyproxy.envoy.config.rbac.v2alpha.Principal.Builder, io.envoyproxy.envoy.config.rbac.v2alpha.PrincipalOrBuilder>
getPrincipalsFieldBuilder() {
if (principalsBuilder_ == null) {
principalsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
io.envoyproxy.envoy.config.rbac.v2alpha.Principal, io.envoyproxy.envoy.config.rbac.v2alpha.Principal.Builder, io.envoyproxy.envoy.config.rbac.v2alpha.PrincipalOrBuilder>(
principals_,
((bitField0_ & 0x00000002) == 0x00000002),
getParentForChildren(),
isClean());
principals_ = null;
}
return principalsBuilder_;
}
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFieldsProto3(unknownFields);
}
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:envoy.config.rbac.v2alpha.Policy)
}
// @@protoc_insertion_point(class_scope:envoy.config.rbac.v2alpha.Policy)
private static final io.envoyproxy.envoy.config.rbac.v2alpha.Policy DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new io.envoyproxy.envoy.config.rbac.v2alpha.Policy();
}
public static io.envoyproxy.envoy.config.rbac.v2alpha.Policy getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
public Policy parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new Policy(input, extensionRegistry);
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
public io.envoyproxy.envoy.config.rbac.v2alpha.Policy getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy