All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.envoyproxy.envoy.config.rbac.v3.RBAC Maven / Gradle / Ivy

// Generated by the protocol buffer compiler.  DO NOT EDIT!
// source: envoy/config/rbac/v3/rbac.proto

package io.envoyproxy.envoy.config.rbac.v3;

/**
 * 
 * Role Based Access Control (RBAC) provides service-level and method-level access control for a
 * service. Requests are allowed or denied based on the ``action`` and whether a matching policy is
 * found. For instance, if the action is ALLOW and a matching policy is found the request should be
 * allowed.
 * RBAC can also be used to make access logging decisions by communicating with access loggers
 * through dynamic metadata. When the action is LOG and at least one policy matches, the
 * ``access_log_hint`` value in the shared key namespace 'envoy.common' is set to ``true`` indicating
 * the request should be logged.
 * Here is an example of RBAC configuration. It has two policies:
 * * Service account ``cluster.local/ns/default/sa/admin`` has full access to the service, and so
 *   does "cluster.local/ns/default/sa/superuser".
 * * Any user can read (``GET``) the service at paths with prefix ``/products``, so long as the
 *   destination port is either 80 or 443.
 *  .. code-block:: yaml
 *   action: ALLOW
 *   policies:
 *     "service-admin":
 *       permissions:
 *         - any: true
 *       principals:
 *         - authenticated:
 *             principal_name:
 *               exact: "cluster.local/ns/default/sa/admin"
 *         - authenticated:
 *             principal_name:
 *               exact: "cluster.local/ns/default/sa/superuser"
 *     "product-viewer":
 *       permissions:
 *           - and_rules:
 *               rules:
 *                 - header:
 *                     name: ":method"
 *                     string_match:
 *                       exact: "GET"
 *                 - url_path:
 *                     path: { prefix: "/products" }
 *                 - or_rules:
 *                     rules:
 *                       - destination_port: 80
 *                       - destination_port: 443
 *       principals:
 *         - any: true
 * 
* * Protobuf type {@code envoy.config.rbac.v3.RBAC} */ public final class RBAC extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:envoy.config.rbac.v3.RBAC) RBACOrBuilder { private static final long serialVersionUID = 0L; // Use RBAC.newBuilder() to construct. private RBAC(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } private RBAC() { action_ = 0; } @java.lang.Override @SuppressWarnings({"unused"}) protected java.lang.Object newInstance( UnusedPrivateParameter unused) { return new RBAC(); } @java.lang.Override public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } private RBAC( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { this(); if (extensionRegistry == null) { throw new java.lang.NullPointerException(); } int mutable_bitField0_ = 0; com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder(); try { boolean done = false; while (!done) { int tag = input.readTag(); switch (tag) { case 0: done = true; break; case 8: { int rawValue = input.readEnum(); action_ = rawValue; break; } case 18: { if (!((mutable_bitField0_ & 0x00000001) != 0)) { policies_ = com.google.protobuf.MapField.newMapField( PoliciesDefaultEntryHolder.defaultEntry); mutable_bitField0_ |= 0x00000001; } com.google.protobuf.MapEntry policies__ = input.readMessage( PoliciesDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); policies_.getMutableMap().put( policies__.getKey(), policies__.getValue()); break; } case 26: { io.envoyproxy.envoy.config.rbac.v3.RBAC.AuditLoggingOptions.Builder subBuilder = null; if (auditLoggingOptions_ != null) { subBuilder = auditLoggingOptions_.toBuilder(); } auditLoggingOptions_ = input.readMessage(io.envoyproxy.envoy.config.rbac.v3.RBAC.AuditLoggingOptions.parser(), extensionRegistry); if (subBuilder != null) { subBuilder.mergeFrom(auditLoggingOptions_); auditLoggingOptions_ = subBuilder.buildPartial(); } break; } default: { if (!parseUnknownField( input, unknownFields, extensionRegistry, tag)) { done = true; } break; } } } } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.setUnfinishedMessage(this); } catch (com.google.protobuf.UninitializedMessageException e) { throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException( e).setUnfinishedMessage(this); } finally { this.unknownFields = unknownFields.build(); makeExtensionsImmutable(); } } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return io.envoyproxy.envoy.config.rbac.v3.RbacProto.internal_static_envoy_config_rbac_v3_RBAC_descriptor; } @SuppressWarnings({"rawtypes"}) @java.lang.Override protected com.google.protobuf.MapField internalGetMapField( int number) { switch (number) { case 2: return internalGetPolicies(); default: throw new RuntimeException( "Invalid map field number: " + number); } } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return io.envoyproxy.envoy.config.rbac.v3.RbacProto.internal_static_envoy_config_rbac_v3_RBAC_fieldAccessorTable .ensureFieldAccessorsInitialized( io.envoyproxy.envoy.config.rbac.v3.RBAC.class, io.envoyproxy.envoy.config.rbac.v3.RBAC.Builder.class); } /** *
   * Should we do safe-list or block-list style access control?
   * 
* * Protobuf enum {@code envoy.config.rbac.v3.RBAC.Action} */ public enum Action implements com.google.protobuf.ProtocolMessageEnum { /** *
     * The policies grant access to principals. The rest are denied. This is safe-list style
     * access control. This is the default type.
     * 
* * ALLOW = 0; */ ALLOW(0), /** *
     * The policies deny access to principals. The rest are allowed. This is block-list style
     * access control.
     * 
* * DENY = 1; */ DENY(1), /** *
     * The policies set the ``access_log_hint`` dynamic metadata key based on if requests match.
     * All requests are allowed.
     * 
* * LOG = 2; */ LOG(2), UNRECOGNIZED(-1), ; /** *
     * The policies grant access to principals. The rest are denied. This is safe-list style
     * access control. This is the default type.
     * 
* * ALLOW = 0; */ public static final int ALLOW_VALUE = 0; /** *
     * The policies deny access to principals. The rest are allowed. This is block-list style
     * access control.
     * 
* * DENY = 1; */ public static final int DENY_VALUE = 1; /** *
     * The policies set the ``access_log_hint`` dynamic metadata key based on if requests match.
     * All requests are allowed.
     * 
* * LOG = 2; */ public static final int LOG_VALUE = 2; public final int getNumber() { if (this == UNRECOGNIZED) { throw new java.lang.IllegalArgumentException( "Can't get the number of an unknown enum value."); } return value; } /** * @param value The numeric wire value of the corresponding enum entry. * @return The enum associated with the given numeric wire value. * @deprecated Use {@link #forNumber(int)} instead. */ @java.lang.Deprecated public static Action valueOf(int value) { return forNumber(value); } /** * @param value The numeric wire value of the corresponding enum entry. * @return The enum associated with the given numeric wire value. */ public static Action forNumber(int value) { switch (value) { case 0: return ALLOW; case 1: return DENY; case 2: return LOG; default: return null; } } public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { return internalValueMap; } private static final com.google.protobuf.Internal.EnumLiteMap< Action> internalValueMap = new com.google.protobuf.Internal.EnumLiteMap() { public Action findValueByNumber(int number) { return Action.forNumber(number); } }; public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { if (this == UNRECOGNIZED) { throw new java.lang.IllegalStateException( "Can't get the descriptor of an unrecognized enum value."); } return getDescriptor().getValues().get(ordinal()); } public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { return getDescriptor(); } public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { return io.envoyproxy.envoy.config.rbac.v3.RBAC.getDescriptor().getEnumTypes().get(0); } private static final Action[] VALUES = values(); public static Action valueOf( com.google.protobuf.Descriptors.EnumValueDescriptor desc) { if (desc.getType() != getDescriptor()) { throw new java.lang.IllegalArgumentException( "EnumValueDescriptor is not for this type."); } if (desc.getIndex() == -1) { return UNRECOGNIZED; } return VALUES[desc.getIndex()]; } private final int value; private Action(int value) { this.value = value; } // @@protoc_insertion_point(enum_scope:envoy.config.rbac.v3.RBAC.Action) } public interface AuditLoggingOptionsOrBuilder extends // @@protoc_insertion_point(interface_extends:envoy.config.rbac.v3.RBAC.AuditLoggingOptions) com.google.protobuf.MessageOrBuilder { /** *
     * Condition for the audit logging to happen.
     * If this condition is met, all the audit loggers configured here will be invoked.
     * [#not-implemented-hide:]
     * 
* * .envoy.config.rbac.v3.RBAC.AuditLoggingOptions.AuditCondition audit_condition = 1 [(.validate.rules) = { ... } * @return The enum numeric value on the wire for auditCondition. */ int getAuditConditionValue(); /** *
     * Condition for the audit logging to happen.
     * If this condition is met, all the audit loggers configured here will be invoked.
     * [#not-implemented-hide:]
     * 
* * .envoy.config.rbac.v3.RBAC.AuditLoggingOptions.AuditCondition audit_condition = 1 [(.validate.rules) = { ... } * @return The auditCondition. */ io.envoyproxy.envoy.config.rbac.v3.RBAC.AuditLoggingOptions.AuditCondition getAuditCondition(); /** *
     * Configurations for RBAC-based authorization audit loggers.
     * [#not-implemented-hide:]
     * 
* * repeated .envoy.config.rbac.v3.RBAC.AuditLoggingOptions.AuditLoggerConfig logger_configs = 2; */ java.util.List getLoggerConfigsList(); /** *
     * Configurations for RBAC-based authorization audit loggers.
     * [#not-implemented-hide:]
     * 
* * repeated .envoy.config.rbac.v3.RBAC.AuditLoggingOptions.AuditLoggerConfig logger_configs = 2; */ io.envoyproxy.envoy.config.rbac.v3.RBAC.AuditLoggingOptions.AuditLoggerConfig getLoggerConfigs(int index); /** *
     * Configurations for RBAC-based authorization audit loggers.
     * [#not-implemented-hide:]
     * 
* * repeated .envoy.config.rbac.v3.RBAC.AuditLoggingOptions.AuditLoggerConfig logger_configs = 2; */ int getLoggerConfigsCount(); /** *
     * Configurations for RBAC-based authorization audit loggers.
     * [#not-implemented-hide:]
     * 
* * repeated .envoy.config.rbac.v3.RBAC.AuditLoggingOptions.AuditLoggerConfig logger_configs = 2; */ java.util.List getLoggerConfigsOrBuilderList(); /** *
     * Configurations for RBAC-based authorization audit loggers.
     * [#not-implemented-hide:]
     * 
* * repeated .envoy.config.rbac.v3.RBAC.AuditLoggingOptions.AuditLoggerConfig logger_configs = 2; */ io.envoyproxy.envoy.config.rbac.v3.RBAC.AuditLoggingOptions.AuditLoggerConfigOrBuilder getLoggerConfigsOrBuilder( int index); } /** * Protobuf type {@code envoy.config.rbac.v3.RBAC.AuditLoggingOptions} */ public static final class AuditLoggingOptions extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:envoy.config.rbac.v3.RBAC.AuditLoggingOptions) AuditLoggingOptionsOrBuilder { private static final long serialVersionUID = 0L; // Use AuditLoggingOptions.newBuilder() to construct. private AuditLoggingOptions(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } private AuditLoggingOptions() { auditCondition_ = 0; loggerConfigs_ = java.util.Collections.emptyList(); } @java.lang.Override @SuppressWarnings({"unused"}) protected java.lang.Object newInstance( UnusedPrivateParameter unused) { return new AuditLoggingOptions(); } @java.lang.Override public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } private AuditLoggingOptions( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { this(); if (extensionRegistry == null) { throw new java.lang.NullPointerException(); } int mutable_bitField0_ = 0; com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder(); try { boolean done = false; while (!done) { int tag = input.readTag(); switch (tag) { case 0: done = true; break; case 8: { int rawValue = input.readEnum(); auditCondition_ = rawValue; break; } case 18: { if (!((mutable_bitField0_ & 0x00000001) != 0)) { loggerConfigs_ = new java.util.ArrayList(); mutable_bitField0_ |= 0x00000001; } loggerConfigs_.add( input.readMessage(io.envoyproxy.envoy.config.rbac.v3.RBAC.AuditLoggingOptions.AuditLoggerConfig.parser(), extensionRegistry)); break; } default: { if (!parseUnknownField( input, unknownFields, extensionRegistry, tag)) { done = true; } break; } } } } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.setUnfinishedMessage(this); } catch (com.google.protobuf.UninitializedMessageException e) { throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException( e).setUnfinishedMessage(this); } finally { if (((mutable_bitField0_ & 0x00000001) != 0)) { loggerConfigs_ = java.util.Collections.unmodifiableList(loggerConfigs_); } this.unknownFields = unknownFields.build(); makeExtensionsImmutable(); } } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return io.envoyproxy.envoy.config.rbac.v3.RbacProto.internal_static_envoy_config_rbac_v3_RBAC_AuditLoggingOptions_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_RBAC_AuditLoggingOptions_fieldAccessorTable .ensureFieldAccessorsInitialized( io.envoyproxy.envoy.config.rbac.v3.RBAC.AuditLoggingOptions.class, io.envoyproxy.envoy.config.rbac.v3.RBAC.AuditLoggingOptions.Builder.class); } /** *
     * Deny and allow here refer to RBAC decisions, not actions.
     * 
* * Protobuf enum {@code envoy.config.rbac.v3.RBAC.AuditLoggingOptions.AuditCondition} */ public enum AuditCondition implements com.google.protobuf.ProtocolMessageEnum { /** *
       * Never audit.
       * 
* * NONE = 0; */ NONE(0), /** *
       * Audit when RBAC denies the request.
       * 
* * ON_DENY = 1; */ ON_DENY(1), /** *
       * Audit when RBAC allows the request.
       * 
* * ON_ALLOW = 2; */ ON_ALLOW(2), /** *
       * Audit whether RBAC allows or denies the request.
       * 
* * ON_DENY_AND_ALLOW = 3; */ ON_DENY_AND_ALLOW(3), UNRECOGNIZED(-1), ; /** *
       * Never audit.
       * 
* * NONE = 0; */ public static final int NONE_VALUE = 0; /** *
       * Audit when RBAC denies the request.
       * 
* * ON_DENY = 1; */ public static final int ON_DENY_VALUE = 1; /** *
       * Audit when RBAC allows the request.
       * 
* * ON_ALLOW = 2; */ public static final int ON_ALLOW_VALUE = 2; /** *
       * Audit whether RBAC allows or denies the request.
       * 
* * ON_DENY_AND_ALLOW = 3; */ public static final int ON_DENY_AND_ALLOW_VALUE = 3; public final int getNumber() { if (this == UNRECOGNIZED) { throw new java.lang.IllegalArgumentException( "Can't get the number of an unknown enum value."); } return value; } /** * @param value The numeric wire value of the corresponding enum entry. * @return The enum associated with the given numeric wire value. * @deprecated Use {@link #forNumber(int)} instead. */ @java.lang.Deprecated public static AuditCondition valueOf(int value) { return forNumber(value); } /** * @param value The numeric wire value of the corresponding enum entry. * @return The enum associated with the given numeric wire value. */ public static AuditCondition forNumber(int value) { switch (value) { case 0: return NONE; case 1: return ON_DENY; case 2: return ON_ALLOW; case 3: return ON_DENY_AND_ALLOW; default: return null; } } public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { return internalValueMap; } private static final com.google.protobuf.Internal.EnumLiteMap< AuditCondition> internalValueMap = new com.google.protobuf.Internal.EnumLiteMap() { public AuditCondition findValueByNumber(int number) { return AuditCondition.forNumber(number); } }; public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { if (this == UNRECOGNIZED) { throw new java.lang.IllegalStateException( "Can't get the descriptor of an unrecognized enum value."); } return getDescriptor().getValues().get(ordinal()); } public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { return getDescriptor(); } public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { return io.envoyproxy.envoy.config.rbac.v3.RBAC.AuditLoggingOptions.getDescriptor().getEnumTypes().get(0); } private static final AuditCondition[] VALUES = values(); public static AuditCondition valueOf( com.google.protobuf.Descriptors.EnumValueDescriptor desc) { if (desc.getType() != getDescriptor()) { throw new java.lang.IllegalArgumentException( "EnumValueDescriptor is not for this type."); } if (desc.getIndex() == -1) { return UNRECOGNIZED; } return VALUES[desc.getIndex()]; } private final int value; private AuditCondition(int value) { this.value = value; } // @@protoc_insertion_point(enum_scope:envoy.config.rbac.v3.RBAC.AuditLoggingOptions.AuditCondition) } public interface AuditLoggerConfigOrBuilder extends // @@protoc_insertion_point(interface_extends:envoy.config.rbac.v3.RBAC.AuditLoggingOptions.AuditLoggerConfig) com.google.protobuf.MessageOrBuilder { /** *
       * Typed logger configuration.
       * [#extension-category: envoy.rbac.audit_loggers]
       * 
* * .envoy.config.core.v3.TypedExtensionConfig audit_logger = 1; * @return Whether the auditLogger field is set. */ boolean hasAuditLogger(); /** *
       * Typed logger configuration.
       * [#extension-category: envoy.rbac.audit_loggers]
       * 
* * .envoy.config.core.v3.TypedExtensionConfig audit_logger = 1; * @return The auditLogger. */ io.envoyproxy.envoy.config.core.v3.TypedExtensionConfig getAuditLogger(); /** *
       * Typed logger configuration.
       * [#extension-category: envoy.rbac.audit_loggers]
       * 
* * .envoy.config.core.v3.TypedExtensionConfig audit_logger = 1; */ io.envoyproxy.envoy.config.core.v3.TypedExtensionConfigOrBuilder getAuditLoggerOrBuilder(); /** *
       * If true, when the logger is not supported, the data plane will not NACK but simply ignore it.
       * 
* * bool is_optional = 2; * @return The isOptional. */ boolean getIsOptional(); } /** *
     * [#not-implemented-hide:]
     * 
* * Protobuf type {@code envoy.config.rbac.v3.RBAC.AuditLoggingOptions.AuditLoggerConfig} */ public static final class AuditLoggerConfig extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:envoy.config.rbac.v3.RBAC.AuditLoggingOptions.AuditLoggerConfig) AuditLoggerConfigOrBuilder { private static final long serialVersionUID = 0L; // Use AuditLoggerConfig.newBuilder() to construct. private AuditLoggerConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } private AuditLoggerConfig() { } @java.lang.Override @SuppressWarnings({"unused"}) protected java.lang.Object newInstance( UnusedPrivateParameter unused) { return new AuditLoggerConfig(); } @java.lang.Override public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } private AuditLoggerConfig( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { this(); if (extensionRegistry == null) { throw new java.lang.NullPointerException(); } com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder(); try { boolean done = false; while (!done) { int tag = input.readTag(); switch (tag) { case 0: done = true; break; case 10: { io.envoyproxy.envoy.config.core.v3.TypedExtensionConfig.Builder subBuilder = null; if (auditLogger_ != null) { subBuilder = auditLogger_.toBuilder(); } auditLogger_ = input.readMessage(io.envoyproxy.envoy.config.core.v3.TypedExtensionConfig.parser(), extensionRegistry); if (subBuilder != null) { subBuilder.mergeFrom(auditLogger_); auditLogger_ = subBuilder.buildPartial(); } break; } case 16: { isOptional_ = input.readBool(); break; } default: { if (!parseUnknownField( input, unknownFields, extensionRegistry, tag)) { done = true; } break; } } } } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.setUnfinishedMessage(this); } catch (com.google.protobuf.UninitializedMessageException e) { throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException( e).setUnfinishedMessage(this); } finally { this.unknownFields = unknownFields.build(); makeExtensionsImmutable(); } } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return io.envoyproxy.envoy.config.rbac.v3.RbacProto.internal_static_envoy_config_rbac_v3_RBAC_AuditLoggingOptions_AuditLoggerConfig_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_RBAC_AuditLoggingOptions_AuditLoggerConfig_fieldAccessorTable .ensureFieldAccessorsInitialized( io.envoyproxy.envoy.config.rbac.v3.RBAC.AuditLoggingOptions.AuditLoggerConfig.class, io.envoyproxy.envoy.config.rbac.v3.RBAC.AuditLoggingOptions.AuditLoggerConfig.Builder.class); } public static final int AUDIT_LOGGER_FIELD_NUMBER = 1; private io.envoyproxy.envoy.config.core.v3.TypedExtensionConfig auditLogger_; /** *
       * Typed logger configuration.
       * [#extension-category: envoy.rbac.audit_loggers]
       * 
* * .envoy.config.core.v3.TypedExtensionConfig audit_logger = 1; * @return Whether the auditLogger field is set. */ @java.lang.Override public boolean hasAuditLogger() { return auditLogger_ != null; } /** *
       * Typed logger configuration.
       * [#extension-category: envoy.rbac.audit_loggers]
       * 
* * .envoy.config.core.v3.TypedExtensionConfig audit_logger = 1; * @return The auditLogger. */ @java.lang.Override public io.envoyproxy.envoy.config.core.v3.TypedExtensionConfig getAuditLogger() { return auditLogger_ == null ? io.envoyproxy.envoy.config.core.v3.TypedExtensionConfig.getDefaultInstance() : auditLogger_; } /** *
       * Typed logger configuration.
       * [#extension-category: envoy.rbac.audit_loggers]
       * 
* * .envoy.config.core.v3.TypedExtensionConfig audit_logger = 1; */ @java.lang.Override public io.envoyproxy.envoy.config.core.v3.TypedExtensionConfigOrBuilder getAuditLoggerOrBuilder() { return getAuditLogger(); } public static final int IS_OPTIONAL_FIELD_NUMBER = 2; private boolean isOptional_; /** *
       * If true, when the logger is not supported, the data plane will not NACK but simply ignore it.
       * 
* * bool is_optional = 2; * @return The isOptional. */ @java.lang.Override public boolean getIsOptional() { return isOptional_; } private byte memoizedIsInitialized = -1; @java.lang.Override public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized == 1) return true; if (isInitialized == 0) return false; memoizedIsInitialized = 1; return true; } @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { if (auditLogger_ != null) { output.writeMessage(1, getAuditLogger()); } if (isOptional_ != false) { output.writeBool(2, isOptional_); } unknownFields.writeTo(output); } @java.lang.Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; if (auditLogger_ != null) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(1, getAuditLogger()); } if (isOptional_ != false) { size += com.google.protobuf.CodedOutputStream .computeBoolSize(2, isOptional_); } 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.v3.RBAC.AuditLoggingOptions.AuditLoggerConfig)) { return super.equals(obj); } io.envoyproxy.envoy.config.rbac.v3.RBAC.AuditLoggingOptions.AuditLoggerConfig other = (io.envoyproxy.envoy.config.rbac.v3.RBAC.AuditLoggingOptions.AuditLoggerConfig) obj; if (hasAuditLogger() != other.hasAuditLogger()) return false; if (hasAuditLogger()) { if (!getAuditLogger() .equals(other.getAuditLogger())) return false; } if (getIsOptional() != other.getIsOptional()) return false; if (!unknownFields.equals(other.unknownFields)) return false; return true; } @java.lang.Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); if (hasAuditLogger()) { hash = (37 * hash) + AUDIT_LOGGER_FIELD_NUMBER; hash = (53 * hash) + getAuditLogger().hashCode(); } hash = (37 * hash) + IS_OPTIONAL_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( getIsOptional()); hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; } public static io.envoyproxy.envoy.config.rbac.v3.RBAC.AuditLoggingOptions.AuditLoggerConfig parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static io.envoyproxy.envoy.config.rbac.v3.RBAC.AuditLoggingOptions.AuditLoggerConfig 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.RBAC.AuditLoggingOptions.AuditLoggerConfig parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static io.envoyproxy.envoy.config.rbac.v3.RBAC.AuditLoggingOptions.AuditLoggerConfig 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.RBAC.AuditLoggingOptions.AuditLoggerConfig parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static io.envoyproxy.envoy.config.rbac.v3.RBAC.AuditLoggingOptions.AuditLoggerConfig 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.RBAC.AuditLoggingOptions.AuditLoggerConfig 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.RBAC.AuditLoggingOptions.AuditLoggerConfig 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.RBAC.AuditLoggingOptions.AuditLoggerConfig 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.RBAC.AuditLoggingOptions.AuditLoggerConfig 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.RBAC.AuditLoggingOptions.AuditLoggerConfig 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.RBAC.AuditLoggingOptions.AuditLoggerConfig 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.RBAC.AuditLoggingOptions.AuditLoggerConfig 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; } /** *
       * [#not-implemented-hide:]
       * 
* * Protobuf type {@code envoy.config.rbac.v3.RBAC.AuditLoggingOptions.AuditLoggerConfig} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:envoy.config.rbac.v3.RBAC.AuditLoggingOptions.AuditLoggerConfig) io.envoyproxy.envoy.config.rbac.v3.RBAC.AuditLoggingOptions.AuditLoggerConfigOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return io.envoyproxy.envoy.config.rbac.v3.RbacProto.internal_static_envoy_config_rbac_v3_RBAC_AuditLoggingOptions_AuditLoggerConfig_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_RBAC_AuditLoggingOptions_AuditLoggerConfig_fieldAccessorTable .ensureFieldAccessorsInitialized( io.envoyproxy.envoy.config.rbac.v3.RBAC.AuditLoggingOptions.AuditLoggerConfig.class, io.envoyproxy.envoy.config.rbac.v3.RBAC.AuditLoggingOptions.AuditLoggerConfig.Builder.class); } // Construct using io.envoyproxy.envoy.config.rbac.v3.RBAC.AuditLoggingOptions.AuditLoggerConfig.newBuilder() private Builder() { maybeForceBuilderInitialization(); } private Builder( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessageV3 .alwaysUseFieldBuilders) { } } @java.lang.Override public Builder clear() { super.clear(); if (auditLoggerBuilder_ == null) { auditLogger_ = null; } else { auditLogger_ = null; auditLoggerBuilder_ = null; } isOptional_ = false; 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_RBAC_AuditLoggingOptions_AuditLoggerConfig_descriptor; } @java.lang.Override public io.envoyproxy.envoy.config.rbac.v3.RBAC.AuditLoggingOptions.AuditLoggerConfig getDefaultInstanceForType() { return io.envoyproxy.envoy.config.rbac.v3.RBAC.AuditLoggingOptions.AuditLoggerConfig.getDefaultInstance(); } @java.lang.Override public io.envoyproxy.envoy.config.rbac.v3.RBAC.AuditLoggingOptions.AuditLoggerConfig build() { io.envoyproxy.envoy.config.rbac.v3.RBAC.AuditLoggingOptions.AuditLoggerConfig result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } @java.lang.Override public io.envoyproxy.envoy.config.rbac.v3.RBAC.AuditLoggingOptions.AuditLoggerConfig buildPartial() { io.envoyproxy.envoy.config.rbac.v3.RBAC.AuditLoggingOptions.AuditLoggerConfig result = new io.envoyproxy.envoy.config.rbac.v3.RBAC.AuditLoggingOptions.AuditLoggerConfig(this); if (auditLoggerBuilder_ == null) { result.auditLogger_ = auditLogger_; } else { result.auditLogger_ = auditLoggerBuilder_.build(); } result.isOptional_ = isOptional_; onBuilt(); return result; } @java.lang.Override public Builder clone() { return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { return super.setField(field, value); } @java.lang.Override public Builder clearField( com.google.protobuf.Descriptors.FieldDescriptor field) { return super.clearField(field); } @java.lang.Override public Builder clearOneof( com.google.protobuf.Descriptors.OneofDescriptor oneof) { return super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { return super.addRepeatedField(field, value); } @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof io.envoyproxy.envoy.config.rbac.v3.RBAC.AuditLoggingOptions.AuditLoggerConfig) { return mergeFrom((io.envoyproxy.envoy.config.rbac.v3.RBAC.AuditLoggingOptions.AuditLoggerConfig)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(io.envoyproxy.envoy.config.rbac.v3.RBAC.AuditLoggingOptions.AuditLoggerConfig other) { if (other == io.envoyproxy.envoy.config.rbac.v3.RBAC.AuditLoggingOptions.AuditLoggerConfig.getDefaultInstance()) return this; if (other.hasAuditLogger()) { mergeAuditLogger(other.getAuditLogger()); } if (other.getIsOptional() != false) { setIsOptional(other.getIsOptional()); } this.mergeUnknownFields(other.unknownFields); onChanged(); return this; } @java.lang.Override public final boolean isInitialized() { return true; } @java.lang.Override public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { io.envoyproxy.envoy.config.rbac.v3.RBAC.AuditLoggingOptions.AuditLoggerConfig parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = (io.envoyproxy.envoy.config.rbac.v3.RBAC.AuditLoggingOptions.AuditLoggerConfig) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { if (parsedMessage != null) { mergeFrom(parsedMessage); } } return this; } private io.envoyproxy.envoy.config.core.v3.TypedExtensionConfig auditLogger_; private com.google.protobuf.SingleFieldBuilderV3< io.envoyproxy.envoy.config.core.v3.TypedExtensionConfig, io.envoyproxy.envoy.config.core.v3.TypedExtensionConfig.Builder, io.envoyproxy.envoy.config.core.v3.TypedExtensionConfigOrBuilder> auditLoggerBuilder_; /** *
         * Typed logger configuration.
         * [#extension-category: envoy.rbac.audit_loggers]
         * 
* * .envoy.config.core.v3.TypedExtensionConfig audit_logger = 1; * @return Whether the auditLogger field is set. */ public boolean hasAuditLogger() { return auditLoggerBuilder_ != null || auditLogger_ != null; } /** *
         * Typed logger configuration.
         * [#extension-category: envoy.rbac.audit_loggers]
         * 
* * .envoy.config.core.v3.TypedExtensionConfig audit_logger = 1; * @return The auditLogger. */ public io.envoyproxy.envoy.config.core.v3.TypedExtensionConfig getAuditLogger() { if (auditLoggerBuilder_ == null) { return auditLogger_ == null ? io.envoyproxy.envoy.config.core.v3.TypedExtensionConfig.getDefaultInstance() : auditLogger_; } else { return auditLoggerBuilder_.getMessage(); } } /** *
         * Typed logger configuration.
         * [#extension-category: envoy.rbac.audit_loggers]
         * 
* * .envoy.config.core.v3.TypedExtensionConfig audit_logger = 1; */ public Builder setAuditLogger(io.envoyproxy.envoy.config.core.v3.TypedExtensionConfig value) { if (auditLoggerBuilder_ == null) { if (value == null) { throw new NullPointerException(); } auditLogger_ = value; onChanged(); } else { auditLoggerBuilder_.setMessage(value); } return this; } /** *
         * Typed logger configuration.
         * [#extension-category: envoy.rbac.audit_loggers]
         * 
* * .envoy.config.core.v3.TypedExtensionConfig audit_logger = 1; */ public Builder setAuditLogger( io.envoyproxy.envoy.config.core.v3.TypedExtensionConfig.Builder builderForValue) { if (auditLoggerBuilder_ == null) { auditLogger_ = builderForValue.build(); onChanged(); } else { auditLoggerBuilder_.setMessage(builderForValue.build()); } return this; } /** *
         * Typed logger configuration.
         * [#extension-category: envoy.rbac.audit_loggers]
         * 
* * .envoy.config.core.v3.TypedExtensionConfig audit_logger = 1; */ public Builder mergeAuditLogger(io.envoyproxy.envoy.config.core.v3.TypedExtensionConfig value) { if (auditLoggerBuilder_ == null) { if (auditLogger_ != null) { auditLogger_ = io.envoyproxy.envoy.config.core.v3.TypedExtensionConfig.newBuilder(auditLogger_).mergeFrom(value).buildPartial(); } else { auditLogger_ = value; } onChanged(); } else { auditLoggerBuilder_.mergeFrom(value); } return this; } /** *
         * Typed logger configuration.
         * [#extension-category: envoy.rbac.audit_loggers]
         * 
* * .envoy.config.core.v3.TypedExtensionConfig audit_logger = 1; */ public Builder clearAuditLogger() { if (auditLoggerBuilder_ == null) { auditLogger_ = null; onChanged(); } else { auditLogger_ = null; auditLoggerBuilder_ = null; } return this; } /** *
         * Typed logger configuration.
         * [#extension-category: envoy.rbac.audit_loggers]
         * 
* * .envoy.config.core.v3.TypedExtensionConfig audit_logger = 1; */ public io.envoyproxy.envoy.config.core.v3.TypedExtensionConfig.Builder getAuditLoggerBuilder() { onChanged(); return getAuditLoggerFieldBuilder().getBuilder(); } /** *
         * Typed logger configuration.
         * [#extension-category: envoy.rbac.audit_loggers]
         * 
* * .envoy.config.core.v3.TypedExtensionConfig audit_logger = 1; */ public io.envoyproxy.envoy.config.core.v3.TypedExtensionConfigOrBuilder getAuditLoggerOrBuilder() { if (auditLoggerBuilder_ != null) { return auditLoggerBuilder_.getMessageOrBuilder(); } else { return auditLogger_ == null ? io.envoyproxy.envoy.config.core.v3.TypedExtensionConfig.getDefaultInstance() : auditLogger_; } } /** *
         * Typed logger configuration.
         * [#extension-category: envoy.rbac.audit_loggers]
         * 
* * .envoy.config.core.v3.TypedExtensionConfig audit_logger = 1; */ private com.google.protobuf.SingleFieldBuilderV3< io.envoyproxy.envoy.config.core.v3.TypedExtensionConfig, io.envoyproxy.envoy.config.core.v3.TypedExtensionConfig.Builder, io.envoyproxy.envoy.config.core.v3.TypedExtensionConfigOrBuilder> getAuditLoggerFieldBuilder() { if (auditLoggerBuilder_ == null) { auditLoggerBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< io.envoyproxy.envoy.config.core.v3.TypedExtensionConfig, io.envoyproxy.envoy.config.core.v3.TypedExtensionConfig.Builder, io.envoyproxy.envoy.config.core.v3.TypedExtensionConfigOrBuilder>( getAuditLogger(), getParentForChildren(), isClean()); auditLogger_ = null; } return auditLoggerBuilder_; } private boolean isOptional_ ; /** *
         * If true, when the logger is not supported, the data plane will not NACK but simply ignore it.
         * 
* * bool is_optional = 2; * @return The isOptional. */ @java.lang.Override public boolean getIsOptional() { return isOptional_; } /** *
         * If true, when the logger is not supported, the data plane will not NACK but simply ignore it.
         * 
* * bool is_optional = 2; * @param value The isOptional to set. * @return This builder for chaining. */ public Builder setIsOptional(boolean value) { isOptional_ = value; onChanged(); return this; } /** *
         * If true, when the logger is not supported, the data plane will not NACK but simply ignore it.
         * 
* * bool is_optional = 2; * @return This builder for chaining. */ public Builder clearIsOptional() { isOptional_ = false; onChanged(); return this; } @java.lang.Override public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); } @java.lang.Override public final Builder mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return super.mergeUnknownFields(unknownFields); } // @@protoc_insertion_point(builder_scope:envoy.config.rbac.v3.RBAC.AuditLoggingOptions.AuditLoggerConfig) } // @@protoc_insertion_point(class_scope:envoy.config.rbac.v3.RBAC.AuditLoggingOptions.AuditLoggerConfig) private static final io.envoyproxy.envoy.config.rbac.v3.RBAC.AuditLoggingOptions.AuditLoggerConfig DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new io.envoyproxy.envoy.config.rbac.v3.RBAC.AuditLoggingOptions.AuditLoggerConfig(); } public static io.envoyproxy.envoy.config.rbac.v3.RBAC.AuditLoggingOptions.AuditLoggerConfig getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { @java.lang.Override public AuditLoggerConfig parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return new AuditLoggerConfig(input, extensionRegistry); } }; public static com.google.protobuf.Parser parser() { return PARSER; } @java.lang.Override public com.google.protobuf.Parser getParserForType() { return PARSER; } @java.lang.Override public io.envoyproxy.envoy.config.rbac.v3.RBAC.AuditLoggingOptions.AuditLoggerConfig getDefaultInstanceForType() { return DEFAULT_INSTANCE; } } public static final int AUDIT_CONDITION_FIELD_NUMBER = 1; private int auditCondition_; /** *
     * Condition for the audit logging to happen.
     * If this condition is met, all the audit loggers configured here will be invoked.
     * [#not-implemented-hide:]
     * 
* * .envoy.config.rbac.v3.RBAC.AuditLoggingOptions.AuditCondition audit_condition = 1 [(.validate.rules) = { ... } * @return The enum numeric value on the wire for auditCondition. */ @java.lang.Override public int getAuditConditionValue() { return auditCondition_; } /** *
     * Condition for the audit logging to happen.
     * If this condition is met, all the audit loggers configured here will be invoked.
     * [#not-implemented-hide:]
     * 
* * .envoy.config.rbac.v3.RBAC.AuditLoggingOptions.AuditCondition audit_condition = 1 [(.validate.rules) = { ... } * @return The auditCondition. */ @java.lang.Override public io.envoyproxy.envoy.config.rbac.v3.RBAC.AuditLoggingOptions.AuditCondition getAuditCondition() { @SuppressWarnings("deprecation") io.envoyproxy.envoy.config.rbac.v3.RBAC.AuditLoggingOptions.AuditCondition result = io.envoyproxy.envoy.config.rbac.v3.RBAC.AuditLoggingOptions.AuditCondition.valueOf(auditCondition_); return result == null ? io.envoyproxy.envoy.config.rbac.v3.RBAC.AuditLoggingOptions.AuditCondition.UNRECOGNIZED : result; } public static final int LOGGER_CONFIGS_FIELD_NUMBER = 2; private java.util.List loggerConfigs_; /** *
     * Configurations for RBAC-based authorization audit loggers.
     * [#not-implemented-hide:]
     * 
* * repeated .envoy.config.rbac.v3.RBAC.AuditLoggingOptions.AuditLoggerConfig logger_configs = 2; */ @java.lang.Override public java.util.List getLoggerConfigsList() { return loggerConfigs_; } /** *
     * Configurations for RBAC-based authorization audit loggers.
     * [#not-implemented-hide:]
     * 
* * repeated .envoy.config.rbac.v3.RBAC.AuditLoggingOptions.AuditLoggerConfig logger_configs = 2; */ @java.lang.Override public java.util.List getLoggerConfigsOrBuilderList() { return loggerConfigs_; } /** *
     * Configurations for RBAC-based authorization audit loggers.
     * [#not-implemented-hide:]
     * 
* * repeated .envoy.config.rbac.v3.RBAC.AuditLoggingOptions.AuditLoggerConfig logger_configs = 2; */ @java.lang.Override public int getLoggerConfigsCount() { return loggerConfigs_.size(); } /** *
     * Configurations for RBAC-based authorization audit loggers.
     * [#not-implemented-hide:]
     * 
* * repeated .envoy.config.rbac.v3.RBAC.AuditLoggingOptions.AuditLoggerConfig logger_configs = 2; */ @java.lang.Override public io.envoyproxy.envoy.config.rbac.v3.RBAC.AuditLoggingOptions.AuditLoggerConfig getLoggerConfigs(int index) { return loggerConfigs_.get(index); } /** *
     * Configurations for RBAC-based authorization audit loggers.
     * [#not-implemented-hide:]
     * 
* * repeated .envoy.config.rbac.v3.RBAC.AuditLoggingOptions.AuditLoggerConfig logger_configs = 2; */ @java.lang.Override public io.envoyproxy.envoy.config.rbac.v3.RBAC.AuditLoggingOptions.AuditLoggerConfigOrBuilder getLoggerConfigsOrBuilder( int index) { return loggerConfigs_.get(index); } private byte memoizedIsInitialized = -1; @java.lang.Override public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized == 1) return true; if (isInitialized == 0) return false; memoizedIsInitialized = 1; return true; } @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { if (auditCondition_ != io.envoyproxy.envoy.config.rbac.v3.RBAC.AuditLoggingOptions.AuditCondition.NONE.getNumber()) { output.writeEnum(1, auditCondition_); } for (int i = 0; i < loggerConfigs_.size(); i++) { output.writeMessage(2, loggerConfigs_.get(i)); } unknownFields.writeTo(output); } @java.lang.Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; if (auditCondition_ != io.envoyproxy.envoy.config.rbac.v3.RBAC.AuditLoggingOptions.AuditCondition.NONE.getNumber()) { size += com.google.protobuf.CodedOutputStream .computeEnumSize(1, auditCondition_); } for (int i = 0; i < loggerConfigs_.size(); i++) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(2, loggerConfigs_.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.v3.RBAC.AuditLoggingOptions)) { return super.equals(obj); } io.envoyproxy.envoy.config.rbac.v3.RBAC.AuditLoggingOptions other = (io.envoyproxy.envoy.config.rbac.v3.RBAC.AuditLoggingOptions) obj; if (auditCondition_ != other.auditCondition_) return false; if (!getLoggerConfigsList() .equals(other.getLoggerConfigsList())) return false; if (!unknownFields.equals(other.unknownFields)) return false; return true; } @java.lang.Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + AUDIT_CONDITION_FIELD_NUMBER; hash = (53 * hash) + auditCondition_; if (getLoggerConfigsCount() > 0) { hash = (37 * hash) + LOGGER_CONFIGS_FIELD_NUMBER; hash = (53 * hash) + getLoggerConfigsList().hashCode(); } hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; } public static io.envoyproxy.envoy.config.rbac.v3.RBAC.AuditLoggingOptions parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static io.envoyproxy.envoy.config.rbac.v3.RBAC.AuditLoggingOptions 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.RBAC.AuditLoggingOptions parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static io.envoyproxy.envoy.config.rbac.v3.RBAC.AuditLoggingOptions 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.RBAC.AuditLoggingOptions parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static io.envoyproxy.envoy.config.rbac.v3.RBAC.AuditLoggingOptions 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.RBAC.AuditLoggingOptions 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.RBAC.AuditLoggingOptions 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.RBAC.AuditLoggingOptions 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.RBAC.AuditLoggingOptions 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.RBAC.AuditLoggingOptions 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.RBAC.AuditLoggingOptions 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.RBAC.AuditLoggingOptions prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } @java.lang.Override public Builder toBuilder() { return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); } @java.lang.Override protected Builder newBuilderForType( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } /** * Protobuf type {@code envoy.config.rbac.v3.RBAC.AuditLoggingOptions} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:envoy.config.rbac.v3.RBAC.AuditLoggingOptions) io.envoyproxy.envoy.config.rbac.v3.RBAC.AuditLoggingOptionsOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return io.envoyproxy.envoy.config.rbac.v3.RbacProto.internal_static_envoy_config_rbac_v3_RBAC_AuditLoggingOptions_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_RBAC_AuditLoggingOptions_fieldAccessorTable .ensureFieldAccessorsInitialized( io.envoyproxy.envoy.config.rbac.v3.RBAC.AuditLoggingOptions.class, io.envoyproxy.envoy.config.rbac.v3.RBAC.AuditLoggingOptions.Builder.class); } // Construct using io.envoyproxy.envoy.config.rbac.v3.RBAC.AuditLoggingOptions.newBuilder() private Builder() { maybeForceBuilderInitialization(); } private Builder( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessageV3 .alwaysUseFieldBuilders) { getLoggerConfigsFieldBuilder(); } } @java.lang.Override public Builder clear() { super.clear(); auditCondition_ = 0; if (loggerConfigsBuilder_ == null) { loggerConfigs_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00000001); } else { loggerConfigsBuilder_.clear(); } 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_RBAC_AuditLoggingOptions_descriptor; } @java.lang.Override public io.envoyproxy.envoy.config.rbac.v3.RBAC.AuditLoggingOptions getDefaultInstanceForType() { return io.envoyproxy.envoy.config.rbac.v3.RBAC.AuditLoggingOptions.getDefaultInstance(); } @java.lang.Override public io.envoyproxy.envoy.config.rbac.v3.RBAC.AuditLoggingOptions build() { io.envoyproxy.envoy.config.rbac.v3.RBAC.AuditLoggingOptions result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } @java.lang.Override public io.envoyproxy.envoy.config.rbac.v3.RBAC.AuditLoggingOptions buildPartial() { io.envoyproxy.envoy.config.rbac.v3.RBAC.AuditLoggingOptions result = new io.envoyproxy.envoy.config.rbac.v3.RBAC.AuditLoggingOptions(this); int from_bitField0_ = bitField0_; result.auditCondition_ = auditCondition_; if (loggerConfigsBuilder_ == null) { if (((bitField0_ & 0x00000001) != 0)) { loggerConfigs_ = java.util.Collections.unmodifiableList(loggerConfigs_); bitField0_ = (bitField0_ & ~0x00000001); } result.loggerConfigs_ = loggerConfigs_; } else { result.loggerConfigs_ = loggerConfigsBuilder_.build(); } onBuilt(); return result; } @java.lang.Override public Builder clone() { return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { return super.setField(field, value); } @java.lang.Override public Builder clearField( com.google.protobuf.Descriptors.FieldDescriptor field) { return super.clearField(field); } @java.lang.Override public Builder clearOneof( com.google.protobuf.Descriptors.OneofDescriptor oneof) { return super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { return super.addRepeatedField(field, value); } @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof io.envoyproxy.envoy.config.rbac.v3.RBAC.AuditLoggingOptions) { return mergeFrom((io.envoyproxy.envoy.config.rbac.v3.RBAC.AuditLoggingOptions)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(io.envoyproxy.envoy.config.rbac.v3.RBAC.AuditLoggingOptions other) { if (other == io.envoyproxy.envoy.config.rbac.v3.RBAC.AuditLoggingOptions.getDefaultInstance()) return this; if (other.auditCondition_ != 0) { setAuditConditionValue(other.getAuditConditionValue()); } if (loggerConfigsBuilder_ == null) { if (!other.loggerConfigs_.isEmpty()) { if (loggerConfigs_.isEmpty()) { loggerConfigs_ = other.loggerConfigs_; bitField0_ = (bitField0_ & ~0x00000001); } else { ensureLoggerConfigsIsMutable(); loggerConfigs_.addAll(other.loggerConfigs_); } onChanged(); } } else { if (!other.loggerConfigs_.isEmpty()) { if (loggerConfigsBuilder_.isEmpty()) { loggerConfigsBuilder_.dispose(); loggerConfigsBuilder_ = null; loggerConfigs_ = other.loggerConfigs_; bitField0_ = (bitField0_ & ~0x00000001); loggerConfigsBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? getLoggerConfigsFieldBuilder() : null; } else { loggerConfigsBuilder_.addAllMessages(other.loggerConfigs_); } } } this.mergeUnknownFields(other.unknownFields); onChanged(); return this; } @java.lang.Override public final boolean isInitialized() { return true; } @java.lang.Override public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { io.envoyproxy.envoy.config.rbac.v3.RBAC.AuditLoggingOptions parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = (io.envoyproxy.envoy.config.rbac.v3.RBAC.AuditLoggingOptions) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { if (parsedMessage != null) { mergeFrom(parsedMessage); } } return this; } private int bitField0_; private int auditCondition_ = 0; /** *
       * Condition for the audit logging to happen.
       * If this condition is met, all the audit loggers configured here will be invoked.
       * [#not-implemented-hide:]
       * 
* * .envoy.config.rbac.v3.RBAC.AuditLoggingOptions.AuditCondition audit_condition = 1 [(.validate.rules) = { ... } * @return The enum numeric value on the wire for auditCondition. */ @java.lang.Override public int getAuditConditionValue() { return auditCondition_; } /** *
       * Condition for the audit logging to happen.
       * If this condition is met, all the audit loggers configured here will be invoked.
       * [#not-implemented-hide:]
       * 
* * .envoy.config.rbac.v3.RBAC.AuditLoggingOptions.AuditCondition audit_condition = 1 [(.validate.rules) = { ... } * @param value The enum numeric value on the wire for auditCondition to set. * @return This builder for chaining. */ public Builder setAuditConditionValue(int value) { auditCondition_ = value; onChanged(); return this; } /** *
       * Condition for the audit logging to happen.
       * If this condition is met, all the audit loggers configured here will be invoked.
       * [#not-implemented-hide:]
       * 
* * .envoy.config.rbac.v3.RBAC.AuditLoggingOptions.AuditCondition audit_condition = 1 [(.validate.rules) = { ... } * @return The auditCondition. */ @java.lang.Override public io.envoyproxy.envoy.config.rbac.v3.RBAC.AuditLoggingOptions.AuditCondition getAuditCondition() { @SuppressWarnings("deprecation") io.envoyproxy.envoy.config.rbac.v3.RBAC.AuditLoggingOptions.AuditCondition result = io.envoyproxy.envoy.config.rbac.v3.RBAC.AuditLoggingOptions.AuditCondition.valueOf(auditCondition_); return result == null ? io.envoyproxy.envoy.config.rbac.v3.RBAC.AuditLoggingOptions.AuditCondition.UNRECOGNIZED : result; } /** *
       * Condition for the audit logging to happen.
       * If this condition is met, all the audit loggers configured here will be invoked.
       * [#not-implemented-hide:]
       * 
* * .envoy.config.rbac.v3.RBAC.AuditLoggingOptions.AuditCondition audit_condition = 1 [(.validate.rules) = { ... } * @param value The auditCondition to set. * @return This builder for chaining. */ public Builder setAuditCondition(io.envoyproxy.envoy.config.rbac.v3.RBAC.AuditLoggingOptions.AuditCondition value) { if (value == null) { throw new NullPointerException(); } auditCondition_ = value.getNumber(); onChanged(); return this; } /** *
       * Condition for the audit logging to happen.
       * If this condition is met, all the audit loggers configured here will be invoked.
       * [#not-implemented-hide:]
       * 
* * .envoy.config.rbac.v3.RBAC.AuditLoggingOptions.AuditCondition audit_condition = 1 [(.validate.rules) = { ... } * @return This builder for chaining. */ public Builder clearAuditCondition() { auditCondition_ = 0; onChanged(); return this; } private java.util.List loggerConfigs_ = java.util.Collections.emptyList(); private void ensureLoggerConfigsIsMutable() { if (!((bitField0_ & 0x00000001) != 0)) { loggerConfigs_ = new java.util.ArrayList(loggerConfigs_); bitField0_ |= 0x00000001; } } private com.google.protobuf.RepeatedFieldBuilderV3< io.envoyproxy.envoy.config.rbac.v3.RBAC.AuditLoggingOptions.AuditLoggerConfig, io.envoyproxy.envoy.config.rbac.v3.RBAC.AuditLoggingOptions.AuditLoggerConfig.Builder, io.envoyproxy.envoy.config.rbac.v3.RBAC.AuditLoggingOptions.AuditLoggerConfigOrBuilder> loggerConfigsBuilder_; /** *
       * Configurations for RBAC-based authorization audit loggers.
       * [#not-implemented-hide:]
       * 
* * repeated .envoy.config.rbac.v3.RBAC.AuditLoggingOptions.AuditLoggerConfig logger_configs = 2; */ public java.util.List getLoggerConfigsList() { if (loggerConfigsBuilder_ == null) { return java.util.Collections.unmodifiableList(loggerConfigs_); } else { return loggerConfigsBuilder_.getMessageList(); } } /** *
       * Configurations for RBAC-based authorization audit loggers.
       * [#not-implemented-hide:]
       * 
* * repeated .envoy.config.rbac.v3.RBAC.AuditLoggingOptions.AuditLoggerConfig logger_configs = 2; */ public int getLoggerConfigsCount() { if (loggerConfigsBuilder_ == null) { return loggerConfigs_.size(); } else { return loggerConfigsBuilder_.getCount(); } } /** *
       * Configurations for RBAC-based authorization audit loggers.
       * [#not-implemented-hide:]
       * 
* * repeated .envoy.config.rbac.v3.RBAC.AuditLoggingOptions.AuditLoggerConfig logger_configs = 2; */ public io.envoyproxy.envoy.config.rbac.v3.RBAC.AuditLoggingOptions.AuditLoggerConfig getLoggerConfigs(int index) { if (loggerConfigsBuilder_ == null) { return loggerConfigs_.get(index); } else { return loggerConfigsBuilder_.getMessage(index); } } /** *
       * Configurations for RBAC-based authorization audit loggers.
       * [#not-implemented-hide:]
       * 
* * repeated .envoy.config.rbac.v3.RBAC.AuditLoggingOptions.AuditLoggerConfig logger_configs = 2; */ public Builder setLoggerConfigs( int index, io.envoyproxy.envoy.config.rbac.v3.RBAC.AuditLoggingOptions.AuditLoggerConfig value) { if (loggerConfigsBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureLoggerConfigsIsMutable(); loggerConfigs_.set(index, value); onChanged(); } else { loggerConfigsBuilder_.setMessage(index, value); } return this; } /** *
       * Configurations for RBAC-based authorization audit loggers.
       * [#not-implemented-hide:]
       * 
* * repeated .envoy.config.rbac.v3.RBAC.AuditLoggingOptions.AuditLoggerConfig logger_configs = 2; */ public Builder setLoggerConfigs( int index, io.envoyproxy.envoy.config.rbac.v3.RBAC.AuditLoggingOptions.AuditLoggerConfig.Builder builderForValue) { if (loggerConfigsBuilder_ == null) { ensureLoggerConfigsIsMutable(); loggerConfigs_.set(index, builderForValue.build()); onChanged(); } else { loggerConfigsBuilder_.setMessage(index, builderForValue.build()); } return this; } /** *
       * Configurations for RBAC-based authorization audit loggers.
       * [#not-implemented-hide:]
       * 
* * repeated .envoy.config.rbac.v3.RBAC.AuditLoggingOptions.AuditLoggerConfig logger_configs = 2; */ public Builder addLoggerConfigs(io.envoyproxy.envoy.config.rbac.v3.RBAC.AuditLoggingOptions.AuditLoggerConfig value) { if (loggerConfigsBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureLoggerConfigsIsMutable(); loggerConfigs_.add(value); onChanged(); } else { loggerConfigsBuilder_.addMessage(value); } return this; } /** *
       * Configurations for RBAC-based authorization audit loggers.
       * [#not-implemented-hide:]
       * 
* * repeated .envoy.config.rbac.v3.RBAC.AuditLoggingOptions.AuditLoggerConfig logger_configs = 2; */ public Builder addLoggerConfigs( int index, io.envoyproxy.envoy.config.rbac.v3.RBAC.AuditLoggingOptions.AuditLoggerConfig value) { if (loggerConfigsBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureLoggerConfigsIsMutable(); loggerConfigs_.add(index, value); onChanged(); } else { loggerConfigsBuilder_.addMessage(index, value); } return this; } /** *
       * Configurations for RBAC-based authorization audit loggers.
       * [#not-implemented-hide:]
       * 
* * repeated .envoy.config.rbac.v3.RBAC.AuditLoggingOptions.AuditLoggerConfig logger_configs = 2; */ public Builder addLoggerConfigs( io.envoyproxy.envoy.config.rbac.v3.RBAC.AuditLoggingOptions.AuditLoggerConfig.Builder builderForValue) { if (loggerConfigsBuilder_ == null) { ensureLoggerConfigsIsMutable(); loggerConfigs_.add(builderForValue.build()); onChanged(); } else { loggerConfigsBuilder_.addMessage(builderForValue.build()); } return this; } /** *
       * Configurations for RBAC-based authorization audit loggers.
       * [#not-implemented-hide:]
       * 
* * repeated .envoy.config.rbac.v3.RBAC.AuditLoggingOptions.AuditLoggerConfig logger_configs = 2; */ public Builder addLoggerConfigs( int index, io.envoyproxy.envoy.config.rbac.v3.RBAC.AuditLoggingOptions.AuditLoggerConfig.Builder builderForValue) { if (loggerConfigsBuilder_ == null) { ensureLoggerConfigsIsMutable(); loggerConfigs_.add(index, builderForValue.build()); onChanged(); } else { loggerConfigsBuilder_.addMessage(index, builderForValue.build()); } return this; } /** *
       * Configurations for RBAC-based authorization audit loggers.
       * [#not-implemented-hide:]
       * 
* * repeated .envoy.config.rbac.v3.RBAC.AuditLoggingOptions.AuditLoggerConfig logger_configs = 2; */ public Builder addAllLoggerConfigs( java.lang.Iterable values) { if (loggerConfigsBuilder_ == null) { ensureLoggerConfigsIsMutable(); com.google.protobuf.AbstractMessageLite.Builder.addAll( values, loggerConfigs_); onChanged(); } else { loggerConfigsBuilder_.addAllMessages(values); } return this; } /** *
       * Configurations for RBAC-based authorization audit loggers.
       * [#not-implemented-hide:]
       * 
* * repeated .envoy.config.rbac.v3.RBAC.AuditLoggingOptions.AuditLoggerConfig logger_configs = 2; */ public Builder clearLoggerConfigs() { if (loggerConfigsBuilder_ == null) { loggerConfigs_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00000001); onChanged(); } else { loggerConfigsBuilder_.clear(); } return this; } /** *
       * Configurations for RBAC-based authorization audit loggers.
       * [#not-implemented-hide:]
       * 
* * repeated .envoy.config.rbac.v3.RBAC.AuditLoggingOptions.AuditLoggerConfig logger_configs = 2; */ public Builder removeLoggerConfigs(int index) { if (loggerConfigsBuilder_ == null) { ensureLoggerConfigsIsMutable(); loggerConfigs_.remove(index); onChanged(); } else { loggerConfigsBuilder_.remove(index); } return this; } /** *
       * Configurations for RBAC-based authorization audit loggers.
       * [#not-implemented-hide:]
       * 
* * repeated .envoy.config.rbac.v3.RBAC.AuditLoggingOptions.AuditLoggerConfig logger_configs = 2; */ public io.envoyproxy.envoy.config.rbac.v3.RBAC.AuditLoggingOptions.AuditLoggerConfig.Builder getLoggerConfigsBuilder( int index) { return getLoggerConfigsFieldBuilder().getBuilder(index); } /** *
       * Configurations for RBAC-based authorization audit loggers.
       * [#not-implemented-hide:]
       * 
* * repeated .envoy.config.rbac.v3.RBAC.AuditLoggingOptions.AuditLoggerConfig logger_configs = 2; */ public io.envoyproxy.envoy.config.rbac.v3.RBAC.AuditLoggingOptions.AuditLoggerConfigOrBuilder getLoggerConfigsOrBuilder( int index) { if (loggerConfigsBuilder_ == null) { return loggerConfigs_.get(index); } else { return loggerConfigsBuilder_.getMessageOrBuilder(index); } } /** *
       * Configurations for RBAC-based authorization audit loggers.
       * [#not-implemented-hide:]
       * 
* * repeated .envoy.config.rbac.v3.RBAC.AuditLoggingOptions.AuditLoggerConfig logger_configs = 2; */ public java.util.List getLoggerConfigsOrBuilderList() { if (loggerConfigsBuilder_ != null) { return loggerConfigsBuilder_.getMessageOrBuilderList(); } else { return java.util.Collections.unmodifiableList(loggerConfigs_); } } /** *
       * Configurations for RBAC-based authorization audit loggers.
       * [#not-implemented-hide:]
       * 
* * repeated .envoy.config.rbac.v3.RBAC.AuditLoggingOptions.AuditLoggerConfig logger_configs = 2; */ public io.envoyproxy.envoy.config.rbac.v3.RBAC.AuditLoggingOptions.AuditLoggerConfig.Builder addLoggerConfigsBuilder() { return getLoggerConfigsFieldBuilder().addBuilder( io.envoyproxy.envoy.config.rbac.v3.RBAC.AuditLoggingOptions.AuditLoggerConfig.getDefaultInstance()); } /** *
       * Configurations for RBAC-based authorization audit loggers.
       * [#not-implemented-hide:]
       * 
* * repeated .envoy.config.rbac.v3.RBAC.AuditLoggingOptions.AuditLoggerConfig logger_configs = 2; */ public io.envoyproxy.envoy.config.rbac.v3.RBAC.AuditLoggingOptions.AuditLoggerConfig.Builder addLoggerConfigsBuilder( int index) { return getLoggerConfigsFieldBuilder().addBuilder( index, io.envoyproxy.envoy.config.rbac.v3.RBAC.AuditLoggingOptions.AuditLoggerConfig.getDefaultInstance()); } /** *
       * Configurations for RBAC-based authorization audit loggers.
       * [#not-implemented-hide:]
       * 
* * repeated .envoy.config.rbac.v3.RBAC.AuditLoggingOptions.AuditLoggerConfig logger_configs = 2; */ public java.util.List getLoggerConfigsBuilderList() { return getLoggerConfigsFieldBuilder().getBuilderList(); } private com.google.protobuf.RepeatedFieldBuilderV3< io.envoyproxy.envoy.config.rbac.v3.RBAC.AuditLoggingOptions.AuditLoggerConfig, io.envoyproxy.envoy.config.rbac.v3.RBAC.AuditLoggingOptions.AuditLoggerConfig.Builder, io.envoyproxy.envoy.config.rbac.v3.RBAC.AuditLoggingOptions.AuditLoggerConfigOrBuilder> getLoggerConfigsFieldBuilder() { if (loggerConfigsBuilder_ == null) { loggerConfigsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< io.envoyproxy.envoy.config.rbac.v3.RBAC.AuditLoggingOptions.AuditLoggerConfig, io.envoyproxy.envoy.config.rbac.v3.RBAC.AuditLoggingOptions.AuditLoggerConfig.Builder, io.envoyproxy.envoy.config.rbac.v3.RBAC.AuditLoggingOptions.AuditLoggerConfigOrBuilder>( loggerConfigs_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); loggerConfigs_ = null; } return loggerConfigsBuilder_; } @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.RBAC.AuditLoggingOptions) } // @@protoc_insertion_point(class_scope:envoy.config.rbac.v3.RBAC.AuditLoggingOptions) private static final io.envoyproxy.envoy.config.rbac.v3.RBAC.AuditLoggingOptions DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new io.envoyproxy.envoy.config.rbac.v3.RBAC.AuditLoggingOptions(); } public static io.envoyproxy.envoy.config.rbac.v3.RBAC.AuditLoggingOptions getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { @java.lang.Override public AuditLoggingOptions parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return new AuditLoggingOptions(input, extensionRegistry); } }; public static com.google.protobuf.Parser parser() { return PARSER; } @java.lang.Override public com.google.protobuf.Parser getParserForType() { return PARSER; } @java.lang.Override public io.envoyproxy.envoy.config.rbac.v3.RBAC.AuditLoggingOptions getDefaultInstanceForType() { return DEFAULT_INSTANCE; } } public static final int ACTION_FIELD_NUMBER = 1; private int action_; /** *
   * The action to take if a policy matches. Every action either allows or denies a request,
   * and can also carry out action-specific operations.
   * Actions:
   *  * ``ALLOW``: Allows the request if and only if there is a policy that matches
   *    the request.
   *  * ``DENY``: Allows the request if and only if there are no policies that
   *    match the request.
   *  * ``LOG``: Allows all requests. If at least one policy matches, the dynamic
   *    metadata key ``access_log_hint`` is set to the value ``true`` under the shared
   *    key namespace ``envoy.common``. If no policies match, it is set to ``false``.
   *    Other actions do not modify this key.
   * 
* * .envoy.config.rbac.v3.RBAC.Action action = 1 [(.validate.rules) = { ... } * @return The enum numeric value on the wire for action. */ @java.lang.Override public int getActionValue() { return action_; } /** *
   * The action to take if a policy matches. Every action either allows or denies a request,
   * and can also carry out action-specific operations.
   * Actions:
   *  * ``ALLOW``: Allows the request if and only if there is a policy that matches
   *    the request.
   *  * ``DENY``: Allows the request if and only if there are no policies that
   *    match the request.
   *  * ``LOG``: Allows all requests. If at least one policy matches, the dynamic
   *    metadata key ``access_log_hint`` is set to the value ``true`` under the shared
   *    key namespace ``envoy.common``. If no policies match, it is set to ``false``.
   *    Other actions do not modify this key.
   * 
* * .envoy.config.rbac.v3.RBAC.Action action = 1 [(.validate.rules) = { ... } * @return The action. */ @java.lang.Override public io.envoyproxy.envoy.config.rbac.v3.RBAC.Action getAction() { @SuppressWarnings("deprecation") io.envoyproxy.envoy.config.rbac.v3.RBAC.Action result = io.envoyproxy.envoy.config.rbac.v3.RBAC.Action.valueOf(action_); return result == null ? io.envoyproxy.envoy.config.rbac.v3.RBAC.Action.UNRECOGNIZED : result; } public static final int POLICIES_FIELD_NUMBER = 2; private static final class PoliciesDefaultEntryHolder { static final com.google.protobuf.MapEntry< java.lang.String, io.envoyproxy.envoy.config.rbac.v3.Policy> defaultEntry = com.google.protobuf.MapEntry .newDefaultInstance( io.envoyproxy.envoy.config.rbac.v3.RbacProto.internal_static_envoy_config_rbac_v3_RBAC_PoliciesEntry_descriptor, com.google.protobuf.WireFormat.FieldType.STRING, "", com.google.protobuf.WireFormat.FieldType.MESSAGE, io.envoyproxy.envoy.config.rbac.v3.Policy.getDefaultInstance()); } private com.google.protobuf.MapField< java.lang.String, io.envoyproxy.envoy.config.rbac.v3.Policy> policies_; private com.google.protobuf.MapField internalGetPolicies() { if (policies_ == null) { return com.google.protobuf.MapField.emptyMapField( PoliciesDefaultEntryHolder.defaultEntry); } return policies_; } public int getPoliciesCount() { return internalGetPolicies().getMap().size(); } /** *
   * Maps from policy name to policy. A match occurs when at least one policy matches the request.
   * The policies are evaluated in lexicographic order of the policy name.
   * 
* * map<string, .envoy.config.rbac.v3.Policy> policies = 2; */ @java.lang.Override public boolean containsPolicies( java.lang.String key) { if (key == null) { throw new NullPointerException("map key"); } return internalGetPolicies().getMap().containsKey(key); } /** * Use {@link #getPoliciesMap()} instead. */ @java.lang.Override @java.lang.Deprecated public java.util.Map getPolicies() { return getPoliciesMap(); } /** *
   * Maps from policy name to policy. A match occurs when at least one policy matches the request.
   * The policies are evaluated in lexicographic order of the policy name.
   * 
* * map<string, .envoy.config.rbac.v3.Policy> policies = 2; */ @java.lang.Override public java.util.Map getPoliciesMap() { return internalGetPolicies().getMap(); } /** *
   * Maps from policy name to policy. A match occurs when at least one policy matches the request.
   * The policies are evaluated in lexicographic order of the policy name.
   * 
* * map<string, .envoy.config.rbac.v3.Policy> policies = 2; */ @java.lang.Override public io.envoyproxy.envoy.config.rbac.v3.Policy getPoliciesOrDefault( java.lang.String key, io.envoyproxy.envoy.config.rbac.v3.Policy defaultValue) { if (key == null) { throw new NullPointerException("map key"); } java.util.Map map = internalGetPolicies().getMap(); return map.containsKey(key) ? map.get(key) : defaultValue; } /** *
   * Maps from policy name to policy. A match occurs when at least one policy matches the request.
   * The policies are evaluated in lexicographic order of the policy name.
   * 
* * map<string, .envoy.config.rbac.v3.Policy> policies = 2; */ @java.lang.Override public io.envoyproxy.envoy.config.rbac.v3.Policy getPoliciesOrThrow( java.lang.String key) { if (key == null) { throw new NullPointerException("map key"); } java.util.Map map = internalGetPolicies().getMap(); if (!map.containsKey(key)) { throw new java.lang.IllegalArgumentException(); } return map.get(key); } public static final int AUDIT_LOGGING_OPTIONS_FIELD_NUMBER = 3; private io.envoyproxy.envoy.config.rbac.v3.RBAC.AuditLoggingOptions auditLoggingOptions_; /** *
   * Audit logging options that include the condition for audit logging to happen
   * and audit logger configurations.
   * [#not-implemented-hide:]
   * 
* * .envoy.config.rbac.v3.RBAC.AuditLoggingOptions audit_logging_options = 3; * @return Whether the auditLoggingOptions field is set. */ @java.lang.Override public boolean hasAuditLoggingOptions() { return auditLoggingOptions_ != null; } /** *
   * Audit logging options that include the condition for audit logging to happen
   * and audit logger configurations.
   * [#not-implemented-hide:]
   * 
* * .envoy.config.rbac.v3.RBAC.AuditLoggingOptions audit_logging_options = 3; * @return The auditLoggingOptions. */ @java.lang.Override public io.envoyproxy.envoy.config.rbac.v3.RBAC.AuditLoggingOptions getAuditLoggingOptions() { return auditLoggingOptions_ == null ? io.envoyproxy.envoy.config.rbac.v3.RBAC.AuditLoggingOptions.getDefaultInstance() : auditLoggingOptions_; } /** *
   * Audit logging options that include the condition for audit logging to happen
   * and audit logger configurations.
   * [#not-implemented-hide:]
   * 
* * .envoy.config.rbac.v3.RBAC.AuditLoggingOptions audit_logging_options = 3; */ @java.lang.Override public io.envoyproxy.envoy.config.rbac.v3.RBAC.AuditLoggingOptionsOrBuilder getAuditLoggingOptionsOrBuilder() { return getAuditLoggingOptions(); } private byte memoizedIsInitialized = -1; @java.lang.Override public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized == 1) return true; if (isInitialized == 0) return false; memoizedIsInitialized = 1; return true; } @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { if (action_ != io.envoyproxy.envoy.config.rbac.v3.RBAC.Action.ALLOW.getNumber()) { output.writeEnum(1, action_); } com.google.protobuf.GeneratedMessageV3 .serializeStringMapTo( output, internalGetPolicies(), PoliciesDefaultEntryHolder.defaultEntry, 2); if (auditLoggingOptions_ != null) { output.writeMessage(3, getAuditLoggingOptions()); } unknownFields.writeTo(output); } @java.lang.Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; if (action_ != io.envoyproxy.envoy.config.rbac.v3.RBAC.Action.ALLOW.getNumber()) { size += com.google.protobuf.CodedOutputStream .computeEnumSize(1, action_); } for (java.util.Map.Entry entry : internalGetPolicies().getMap().entrySet()) { com.google.protobuf.MapEntry policies__ = PoliciesDefaultEntryHolder.defaultEntry.newBuilderForType() .setKey(entry.getKey()) .setValue(entry.getValue()) .build(); size += com.google.protobuf.CodedOutputStream .computeMessageSize(2, policies__); } if (auditLoggingOptions_ != null) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(3, getAuditLoggingOptions()); } 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.v3.RBAC)) { return super.equals(obj); } io.envoyproxy.envoy.config.rbac.v3.RBAC other = (io.envoyproxy.envoy.config.rbac.v3.RBAC) obj; if (action_ != other.action_) return false; if (!internalGetPolicies().equals( other.internalGetPolicies())) return false; if (hasAuditLoggingOptions() != other.hasAuditLoggingOptions()) return false; if (hasAuditLoggingOptions()) { if (!getAuditLoggingOptions() .equals(other.getAuditLoggingOptions())) return false; } if (!unknownFields.equals(other.unknownFields)) return false; return true; } @java.lang.Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + ACTION_FIELD_NUMBER; hash = (53 * hash) + action_; if (!internalGetPolicies().getMap().isEmpty()) { hash = (37 * hash) + POLICIES_FIELD_NUMBER; hash = (53 * hash) + internalGetPolicies().hashCode(); } if (hasAuditLoggingOptions()) { hash = (37 * hash) + AUDIT_LOGGING_OPTIONS_FIELD_NUMBER; hash = (53 * hash) + getAuditLoggingOptions().hashCode(); } hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; } public static io.envoyproxy.envoy.config.rbac.v3.RBAC parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static io.envoyproxy.envoy.config.rbac.v3.RBAC 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.RBAC parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static io.envoyproxy.envoy.config.rbac.v3.RBAC 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.RBAC parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static io.envoyproxy.envoy.config.rbac.v3.RBAC 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.RBAC 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.RBAC 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.RBAC 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.RBAC 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.RBAC 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.RBAC 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.RBAC 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; } /** *
   * Role Based Access Control (RBAC) provides service-level and method-level access control for a
   * service. Requests are allowed or denied based on the ``action`` and whether a matching policy is
   * found. For instance, if the action is ALLOW and a matching policy is found the request should be
   * allowed.
   * RBAC can also be used to make access logging decisions by communicating with access loggers
   * through dynamic metadata. When the action is LOG and at least one policy matches, the
   * ``access_log_hint`` value in the shared key namespace 'envoy.common' is set to ``true`` indicating
   * the request should be logged.
   * Here is an example of RBAC configuration. It has two policies:
   * * Service account ``cluster.local/ns/default/sa/admin`` has full access to the service, and so
   *   does "cluster.local/ns/default/sa/superuser".
   * * Any user can read (``GET``) the service at paths with prefix ``/products``, so long as the
   *   destination port is either 80 or 443.
   *  .. code-block:: yaml
   *   action: ALLOW
   *   policies:
   *     "service-admin":
   *       permissions:
   *         - any: true
   *       principals:
   *         - authenticated:
   *             principal_name:
   *               exact: "cluster.local/ns/default/sa/admin"
   *         - authenticated:
   *             principal_name:
   *               exact: "cluster.local/ns/default/sa/superuser"
   *     "product-viewer":
   *       permissions:
   *           - and_rules:
   *               rules:
   *                 - header:
   *                     name: ":method"
   *                     string_match:
   *                       exact: "GET"
   *                 - url_path:
   *                     path: { prefix: "/products" }
   *                 - or_rules:
   *                     rules:
   *                       - destination_port: 80
   *                       - destination_port: 443
   *       principals:
   *         - any: true
   * 
* * Protobuf type {@code envoy.config.rbac.v3.RBAC} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:envoy.config.rbac.v3.RBAC) io.envoyproxy.envoy.config.rbac.v3.RBACOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return io.envoyproxy.envoy.config.rbac.v3.RbacProto.internal_static_envoy_config_rbac_v3_RBAC_descriptor; } @SuppressWarnings({"rawtypes"}) protected com.google.protobuf.MapField internalGetMapField( int number) { switch (number) { case 2: return internalGetPolicies(); default: throw new RuntimeException( "Invalid map field number: " + number); } } @SuppressWarnings({"rawtypes"}) protected com.google.protobuf.MapField internalGetMutableMapField( int number) { switch (number) { case 2: return internalGetMutablePolicies(); default: throw new RuntimeException( "Invalid map field number: " + number); } } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return io.envoyproxy.envoy.config.rbac.v3.RbacProto.internal_static_envoy_config_rbac_v3_RBAC_fieldAccessorTable .ensureFieldAccessorsInitialized( io.envoyproxy.envoy.config.rbac.v3.RBAC.class, io.envoyproxy.envoy.config.rbac.v3.RBAC.Builder.class); } // Construct using io.envoyproxy.envoy.config.rbac.v3.RBAC.newBuilder() private Builder() { maybeForceBuilderInitialization(); } private Builder( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessageV3 .alwaysUseFieldBuilders) { } } @java.lang.Override public Builder clear() { super.clear(); action_ = 0; internalGetMutablePolicies().clear(); if (auditLoggingOptionsBuilder_ == null) { auditLoggingOptions_ = null; } else { auditLoggingOptions_ = null; auditLoggingOptionsBuilder_ = 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_RBAC_descriptor; } @java.lang.Override public io.envoyproxy.envoy.config.rbac.v3.RBAC getDefaultInstanceForType() { return io.envoyproxy.envoy.config.rbac.v3.RBAC.getDefaultInstance(); } @java.lang.Override public io.envoyproxy.envoy.config.rbac.v3.RBAC build() { io.envoyproxy.envoy.config.rbac.v3.RBAC result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } @java.lang.Override public io.envoyproxy.envoy.config.rbac.v3.RBAC buildPartial() { io.envoyproxy.envoy.config.rbac.v3.RBAC result = new io.envoyproxy.envoy.config.rbac.v3.RBAC(this); int from_bitField0_ = bitField0_; result.action_ = action_; result.policies_ = internalGetPolicies(); result.policies_.makeImmutable(); if (auditLoggingOptionsBuilder_ == null) { result.auditLoggingOptions_ = auditLoggingOptions_; } else { result.auditLoggingOptions_ = auditLoggingOptionsBuilder_.build(); } onBuilt(); return result; } @java.lang.Override public Builder clone() { return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { return super.setField(field, value); } @java.lang.Override public Builder clearField( com.google.protobuf.Descriptors.FieldDescriptor field) { return super.clearField(field); } @java.lang.Override public Builder clearOneof( com.google.protobuf.Descriptors.OneofDescriptor oneof) { return super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { return super.addRepeatedField(field, value); } @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof io.envoyproxy.envoy.config.rbac.v3.RBAC) { return mergeFrom((io.envoyproxy.envoy.config.rbac.v3.RBAC)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(io.envoyproxy.envoy.config.rbac.v3.RBAC other) { if (other == io.envoyproxy.envoy.config.rbac.v3.RBAC.getDefaultInstance()) return this; if (other.action_ != 0) { setActionValue(other.getActionValue()); } internalGetMutablePolicies().mergeFrom( other.internalGetPolicies()); if (other.hasAuditLoggingOptions()) { mergeAuditLoggingOptions(other.getAuditLoggingOptions()); } this.mergeUnknownFields(other.unknownFields); onChanged(); return this; } @java.lang.Override public final boolean isInitialized() { return true; } @java.lang.Override public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { io.envoyproxy.envoy.config.rbac.v3.RBAC parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = (io.envoyproxy.envoy.config.rbac.v3.RBAC) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { if (parsedMessage != null) { mergeFrom(parsedMessage); } } return this; } private int bitField0_; private int action_ = 0; /** *
     * The action to take if a policy matches. Every action either allows or denies a request,
     * and can also carry out action-specific operations.
     * Actions:
     *  * ``ALLOW``: Allows the request if and only if there is a policy that matches
     *    the request.
     *  * ``DENY``: Allows the request if and only if there are no policies that
     *    match the request.
     *  * ``LOG``: Allows all requests. If at least one policy matches, the dynamic
     *    metadata key ``access_log_hint`` is set to the value ``true`` under the shared
     *    key namespace ``envoy.common``. If no policies match, it is set to ``false``.
     *    Other actions do not modify this key.
     * 
* * .envoy.config.rbac.v3.RBAC.Action action = 1 [(.validate.rules) = { ... } * @return The enum numeric value on the wire for action. */ @java.lang.Override public int getActionValue() { return action_; } /** *
     * The action to take if a policy matches. Every action either allows or denies a request,
     * and can also carry out action-specific operations.
     * Actions:
     *  * ``ALLOW``: Allows the request if and only if there is a policy that matches
     *    the request.
     *  * ``DENY``: Allows the request if and only if there are no policies that
     *    match the request.
     *  * ``LOG``: Allows all requests. If at least one policy matches, the dynamic
     *    metadata key ``access_log_hint`` is set to the value ``true`` under the shared
     *    key namespace ``envoy.common``. If no policies match, it is set to ``false``.
     *    Other actions do not modify this key.
     * 
* * .envoy.config.rbac.v3.RBAC.Action action = 1 [(.validate.rules) = { ... } * @param value The enum numeric value on the wire for action to set. * @return This builder for chaining. */ public Builder setActionValue(int value) { action_ = value; onChanged(); return this; } /** *
     * The action to take if a policy matches. Every action either allows or denies a request,
     * and can also carry out action-specific operations.
     * Actions:
     *  * ``ALLOW``: Allows the request if and only if there is a policy that matches
     *    the request.
     *  * ``DENY``: Allows the request if and only if there are no policies that
     *    match the request.
     *  * ``LOG``: Allows all requests. If at least one policy matches, the dynamic
     *    metadata key ``access_log_hint`` is set to the value ``true`` under the shared
     *    key namespace ``envoy.common``. If no policies match, it is set to ``false``.
     *    Other actions do not modify this key.
     * 
* * .envoy.config.rbac.v3.RBAC.Action action = 1 [(.validate.rules) = { ... } * @return The action. */ @java.lang.Override public io.envoyproxy.envoy.config.rbac.v3.RBAC.Action getAction() { @SuppressWarnings("deprecation") io.envoyproxy.envoy.config.rbac.v3.RBAC.Action result = io.envoyproxy.envoy.config.rbac.v3.RBAC.Action.valueOf(action_); return result == null ? io.envoyproxy.envoy.config.rbac.v3.RBAC.Action.UNRECOGNIZED : result; } /** *
     * The action to take if a policy matches. Every action either allows or denies a request,
     * and can also carry out action-specific operations.
     * Actions:
     *  * ``ALLOW``: Allows the request if and only if there is a policy that matches
     *    the request.
     *  * ``DENY``: Allows the request if and only if there are no policies that
     *    match the request.
     *  * ``LOG``: Allows all requests. If at least one policy matches, the dynamic
     *    metadata key ``access_log_hint`` is set to the value ``true`` under the shared
     *    key namespace ``envoy.common``. If no policies match, it is set to ``false``.
     *    Other actions do not modify this key.
     * 
* * .envoy.config.rbac.v3.RBAC.Action action = 1 [(.validate.rules) = { ... } * @param value The action to set. * @return This builder for chaining. */ public Builder setAction(io.envoyproxy.envoy.config.rbac.v3.RBAC.Action value) { if (value == null) { throw new NullPointerException(); } action_ = value.getNumber(); onChanged(); return this; } /** *
     * The action to take if a policy matches. Every action either allows or denies a request,
     * and can also carry out action-specific operations.
     * Actions:
     *  * ``ALLOW``: Allows the request if and only if there is a policy that matches
     *    the request.
     *  * ``DENY``: Allows the request if and only if there are no policies that
     *    match the request.
     *  * ``LOG``: Allows all requests. If at least one policy matches, the dynamic
     *    metadata key ``access_log_hint`` is set to the value ``true`` under the shared
     *    key namespace ``envoy.common``. If no policies match, it is set to ``false``.
     *    Other actions do not modify this key.
     * 
* * .envoy.config.rbac.v3.RBAC.Action action = 1 [(.validate.rules) = { ... } * @return This builder for chaining. */ public Builder clearAction() { action_ = 0; onChanged(); return this; } private com.google.protobuf.MapField< java.lang.String, io.envoyproxy.envoy.config.rbac.v3.Policy> policies_; private com.google.protobuf.MapField internalGetPolicies() { if (policies_ == null) { return com.google.protobuf.MapField.emptyMapField( PoliciesDefaultEntryHolder.defaultEntry); } return policies_; } private com.google.protobuf.MapField internalGetMutablePolicies() { onChanged();; if (policies_ == null) { policies_ = com.google.protobuf.MapField.newMapField( PoliciesDefaultEntryHolder.defaultEntry); } if (!policies_.isMutable()) { policies_ = policies_.copy(); } return policies_; } public int getPoliciesCount() { return internalGetPolicies().getMap().size(); } /** *
     * Maps from policy name to policy. A match occurs when at least one policy matches the request.
     * The policies are evaluated in lexicographic order of the policy name.
     * 
* * map<string, .envoy.config.rbac.v3.Policy> policies = 2; */ @java.lang.Override public boolean containsPolicies( java.lang.String key) { if (key == null) { throw new NullPointerException("map key"); } return internalGetPolicies().getMap().containsKey(key); } /** * Use {@link #getPoliciesMap()} instead. */ @java.lang.Override @java.lang.Deprecated public java.util.Map getPolicies() { return getPoliciesMap(); } /** *
     * Maps from policy name to policy. A match occurs when at least one policy matches the request.
     * The policies are evaluated in lexicographic order of the policy name.
     * 
* * map<string, .envoy.config.rbac.v3.Policy> policies = 2; */ @java.lang.Override public java.util.Map getPoliciesMap() { return internalGetPolicies().getMap(); } /** *
     * Maps from policy name to policy. A match occurs when at least one policy matches the request.
     * The policies are evaluated in lexicographic order of the policy name.
     * 
* * map<string, .envoy.config.rbac.v3.Policy> policies = 2; */ @java.lang.Override public io.envoyproxy.envoy.config.rbac.v3.Policy getPoliciesOrDefault( java.lang.String key, io.envoyproxy.envoy.config.rbac.v3.Policy defaultValue) { if (key == null) { throw new NullPointerException("map key"); } java.util.Map map = internalGetPolicies().getMap(); return map.containsKey(key) ? map.get(key) : defaultValue; } /** *
     * Maps from policy name to policy. A match occurs when at least one policy matches the request.
     * The policies are evaluated in lexicographic order of the policy name.
     * 
* * map<string, .envoy.config.rbac.v3.Policy> policies = 2; */ @java.lang.Override public io.envoyproxy.envoy.config.rbac.v3.Policy getPoliciesOrThrow( java.lang.String key) { if (key == null) { throw new NullPointerException("map key"); } java.util.Map map = internalGetPolicies().getMap(); if (!map.containsKey(key)) { throw new java.lang.IllegalArgumentException(); } return map.get(key); } public Builder clearPolicies() { internalGetMutablePolicies().getMutableMap() .clear(); return this; } /** *
     * Maps from policy name to policy. A match occurs when at least one policy matches the request.
     * The policies are evaluated in lexicographic order of the policy name.
     * 
* * map<string, .envoy.config.rbac.v3.Policy> policies = 2; */ public Builder removePolicies( java.lang.String key) { if (key == null) { throw new NullPointerException("map key"); } internalGetMutablePolicies().getMutableMap() .remove(key); return this; } /** * Use alternate mutation accessors instead. */ @java.lang.Deprecated public java.util.Map getMutablePolicies() { return internalGetMutablePolicies().getMutableMap(); } /** *
     * Maps from policy name to policy. A match occurs when at least one policy matches the request.
     * The policies are evaluated in lexicographic order of the policy name.
     * 
* * map<string, .envoy.config.rbac.v3.Policy> policies = 2; */ public Builder putPolicies( java.lang.String key, io.envoyproxy.envoy.config.rbac.v3.Policy value) { if (key == null) { throw new NullPointerException("map key"); } if (value == null) { throw new NullPointerException("map value"); } internalGetMutablePolicies().getMutableMap() .put(key, value); return this; } /** *
     * Maps from policy name to policy. A match occurs when at least one policy matches the request.
     * The policies are evaluated in lexicographic order of the policy name.
     * 
* * map<string, .envoy.config.rbac.v3.Policy> policies = 2; */ public Builder putAllPolicies( java.util.Map values) { internalGetMutablePolicies().getMutableMap() .putAll(values); return this; } private io.envoyproxy.envoy.config.rbac.v3.RBAC.AuditLoggingOptions auditLoggingOptions_; private com.google.protobuf.SingleFieldBuilderV3< io.envoyproxy.envoy.config.rbac.v3.RBAC.AuditLoggingOptions, io.envoyproxy.envoy.config.rbac.v3.RBAC.AuditLoggingOptions.Builder, io.envoyproxy.envoy.config.rbac.v3.RBAC.AuditLoggingOptionsOrBuilder> auditLoggingOptionsBuilder_; /** *
     * Audit logging options that include the condition for audit logging to happen
     * and audit logger configurations.
     * [#not-implemented-hide:]
     * 
* * .envoy.config.rbac.v3.RBAC.AuditLoggingOptions audit_logging_options = 3; * @return Whether the auditLoggingOptions field is set. */ public boolean hasAuditLoggingOptions() { return auditLoggingOptionsBuilder_ != null || auditLoggingOptions_ != null; } /** *
     * Audit logging options that include the condition for audit logging to happen
     * and audit logger configurations.
     * [#not-implemented-hide:]
     * 
* * .envoy.config.rbac.v3.RBAC.AuditLoggingOptions audit_logging_options = 3; * @return The auditLoggingOptions. */ public io.envoyproxy.envoy.config.rbac.v3.RBAC.AuditLoggingOptions getAuditLoggingOptions() { if (auditLoggingOptionsBuilder_ == null) { return auditLoggingOptions_ == null ? io.envoyproxy.envoy.config.rbac.v3.RBAC.AuditLoggingOptions.getDefaultInstance() : auditLoggingOptions_; } else { return auditLoggingOptionsBuilder_.getMessage(); } } /** *
     * Audit logging options that include the condition for audit logging to happen
     * and audit logger configurations.
     * [#not-implemented-hide:]
     * 
* * .envoy.config.rbac.v3.RBAC.AuditLoggingOptions audit_logging_options = 3; */ public Builder setAuditLoggingOptions(io.envoyproxy.envoy.config.rbac.v3.RBAC.AuditLoggingOptions value) { if (auditLoggingOptionsBuilder_ == null) { if (value == null) { throw new NullPointerException(); } auditLoggingOptions_ = value; onChanged(); } else { auditLoggingOptionsBuilder_.setMessage(value); } return this; } /** *
     * Audit logging options that include the condition for audit logging to happen
     * and audit logger configurations.
     * [#not-implemented-hide:]
     * 
* * .envoy.config.rbac.v3.RBAC.AuditLoggingOptions audit_logging_options = 3; */ public Builder setAuditLoggingOptions( io.envoyproxy.envoy.config.rbac.v3.RBAC.AuditLoggingOptions.Builder builderForValue) { if (auditLoggingOptionsBuilder_ == null) { auditLoggingOptions_ = builderForValue.build(); onChanged(); } else { auditLoggingOptionsBuilder_.setMessage(builderForValue.build()); } return this; } /** *
     * Audit logging options that include the condition for audit logging to happen
     * and audit logger configurations.
     * [#not-implemented-hide:]
     * 
* * .envoy.config.rbac.v3.RBAC.AuditLoggingOptions audit_logging_options = 3; */ public Builder mergeAuditLoggingOptions(io.envoyproxy.envoy.config.rbac.v3.RBAC.AuditLoggingOptions value) { if (auditLoggingOptionsBuilder_ == null) { if (auditLoggingOptions_ != null) { auditLoggingOptions_ = io.envoyproxy.envoy.config.rbac.v3.RBAC.AuditLoggingOptions.newBuilder(auditLoggingOptions_).mergeFrom(value).buildPartial(); } else { auditLoggingOptions_ = value; } onChanged(); } else { auditLoggingOptionsBuilder_.mergeFrom(value); } return this; } /** *
     * Audit logging options that include the condition for audit logging to happen
     * and audit logger configurations.
     * [#not-implemented-hide:]
     * 
* * .envoy.config.rbac.v3.RBAC.AuditLoggingOptions audit_logging_options = 3; */ public Builder clearAuditLoggingOptions() { if (auditLoggingOptionsBuilder_ == null) { auditLoggingOptions_ = null; onChanged(); } else { auditLoggingOptions_ = null; auditLoggingOptionsBuilder_ = null; } return this; } /** *
     * Audit logging options that include the condition for audit logging to happen
     * and audit logger configurations.
     * [#not-implemented-hide:]
     * 
* * .envoy.config.rbac.v3.RBAC.AuditLoggingOptions audit_logging_options = 3; */ public io.envoyproxy.envoy.config.rbac.v3.RBAC.AuditLoggingOptions.Builder getAuditLoggingOptionsBuilder() { onChanged(); return getAuditLoggingOptionsFieldBuilder().getBuilder(); } /** *
     * Audit logging options that include the condition for audit logging to happen
     * and audit logger configurations.
     * [#not-implemented-hide:]
     * 
* * .envoy.config.rbac.v3.RBAC.AuditLoggingOptions audit_logging_options = 3; */ public io.envoyproxy.envoy.config.rbac.v3.RBAC.AuditLoggingOptionsOrBuilder getAuditLoggingOptionsOrBuilder() { if (auditLoggingOptionsBuilder_ != null) { return auditLoggingOptionsBuilder_.getMessageOrBuilder(); } else { return auditLoggingOptions_ == null ? io.envoyproxy.envoy.config.rbac.v3.RBAC.AuditLoggingOptions.getDefaultInstance() : auditLoggingOptions_; } } /** *
     * Audit logging options that include the condition for audit logging to happen
     * and audit logger configurations.
     * [#not-implemented-hide:]
     * 
* * .envoy.config.rbac.v3.RBAC.AuditLoggingOptions audit_logging_options = 3; */ private com.google.protobuf.SingleFieldBuilderV3< io.envoyproxy.envoy.config.rbac.v3.RBAC.AuditLoggingOptions, io.envoyproxy.envoy.config.rbac.v3.RBAC.AuditLoggingOptions.Builder, io.envoyproxy.envoy.config.rbac.v3.RBAC.AuditLoggingOptionsOrBuilder> getAuditLoggingOptionsFieldBuilder() { if (auditLoggingOptionsBuilder_ == null) { auditLoggingOptionsBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< io.envoyproxy.envoy.config.rbac.v3.RBAC.AuditLoggingOptions, io.envoyproxy.envoy.config.rbac.v3.RBAC.AuditLoggingOptions.Builder, io.envoyproxy.envoy.config.rbac.v3.RBAC.AuditLoggingOptionsOrBuilder>( getAuditLoggingOptions(), getParentForChildren(), isClean()); auditLoggingOptions_ = null; } return auditLoggingOptionsBuilder_; } @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.RBAC) } // @@protoc_insertion_point(class_scope:envoy.config.rbac.v3.RBAC) private static final io.envoyproxy.envoy.config.rbac.v3.RBAC DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new io.envoyproxy.envoy.config.rbac.v3.RBAC(); } public static io.envoyproxy.envoy.config.rbac.v3.RBAC getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { @java.lang.Override public RBAC parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return new RBAC(input, extensionRegistry); } }; public static com.google.protobuf.Parser parser() { return PARSER; } @java.lang.Override public com.google.protobuf.Parser getParserForType() { return PARSER; } @java.lang.Override public io.envoyproxy.envoy.config.rbac.v3.RBAC getDefaultInstanceForType() { return DEFAULT_INSTANCE; } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy