Class MethodRestrictions.Builder

java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderT>
com.google.protobuf.GeneratedMessageV3.Builder<MethodRestrictions.Builder>
io.envoyproxy.envoy.extensions.filters.http.proto_api_scrubber.v3.MethodRestrictions.Builder
All Implemented Interfaces:
com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, MethodRestrictionsOrBuilder, Cloneable
Enclosing class:
MethodRestrictions

public static final class MethodRestrictions.Builder extends com.google.protobuf.GeneratedMessageV3.Builder<MethodRestrictions.Builder> implements MethodRestrictionsOrBuilder
 Contains the method restrictions which include the field level restrictions
 for the request and response fields.
 
Protobuf type envoy.extensions.filters.http.proto_api_scrubber.v3.MethodRestrictions
  • Method Details

    • getDescriptor

      public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
    • internalGetMapFieldReflection

      protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection(int number)
      Overrides:
      internalGetMapFieldReflection in class com.google.protobuf.GeneratedMessageV3.Builder<MethodRestrictions.Builder>
    • internalGetMutableMapFieldReflection

      protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection(int number)
      Overrides:
      internalGetMutableMapFieldReflection in class com.google.protobuf.GeneratedMessageV3.Builder<MethodRestrictions.Builder>
    • internalGetFieldAccessorTable

      protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
      Specified by:
      internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessageV3.Builder<MethodRestrictions.Builder>
    • clear

      Specified by:
      clear in interface com.google.protobuf.Message.Builder
      Specified by:
      clear in interface com.google.protobuf.MessageLite.Builder
      Overrides:
      clear in class com.google.protobuf.GeneratedMessageV3.Builder<MethodRestrictions.Builder>
    • getDescriptorForType

      public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
      Specified by:
      getDescriptorForType in interface com.google.protobuf.Message.Builder
      Specified by:
      getDescriptorForType in interface com.google.protobuf.MessageOrBuilder
      Overrides:
      getDescriptorForType in class com.google.protobuf.GeneratedMessageV3.Builder<MethodRestrictions.Builder>
    • getDefaultInstanceForType

      public MethodRestrictions getDefaultInstanceForType()
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder
    • build

      public MethodRestrictions build()
      Specified by:
      build in interface com.google.protobuf.Message.Builder
      Specified by:
      build in interface com.google.protobuf.MessageLite.Builder
    • buildPartial

      public MethodRestrictions buildPartial()
      Specified by:
      buildPartial in interface com.google.protobuf.Message.Builder
      Specified by:
      buildPartial in interface com.google.protobuf.MessageLite.Builder
    • clone

      Specified by:
      clone in interface com.google.protobuf.Message.Builder
      Specified by:
      clone in interface com.google.protobuf.MessageLite.Builder
      Overrides:
      clone in class com.google.protobuf.GeneratedMessageV3.Builder<MethodRestrictions.Builder>
    • setField

      public MethodRestrictions.Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
      Specified by:
      setField in interface com.google.protobuf.Message.Builder
      Overrides:
      setField in class com.google.protobuf.GeneratedMessageV3.Builder<MethodRestrictions.Builder>
    • clearField

      public MethodRestrictions.Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field)
      Specified by:
      clearField in interface com.google.protobuf.Message.Builder
      Overrides:
      clearField in class com.google.protobuf.GeneratedMessageV3.Builder<MethodRestrictions.Builder>
    • clearOneof

      public MethodRestrictions.Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)
      Specified by:
      clearOneof in interface com.google.protobuf.Message.Builder
      Overrides:
      clearOneof in class com.google.protobuf.GeneratedMessageV3.Builder<MethodRestrictions.Builder>
    • setRepeatedField

      public MethodRestrictions.Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value)
      Specified by:
      setRepeatedField in interface com.google.protobuf.Message.Builder
      Overrides:
      setRepeatedField in class com.google.protobuf.GeneratedMessageV3.Builder<MethodRestrictions.Builder>
    • addRepeatedField

      public MethodRestrictions.Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
      Specified by:
      addRepeatedField in interface com.google.protobuf.Message.Builder
      Overrides:
      addRepeatedField in class com.google.protobuf.GeneratedMessageV3.Builder<MethodRestrictions.Builder>
    • mergeFrom

      public MethodRestrictions.Builder mergeFrom(com.google.protobuf.Message other)
      Specified by:
      mergeFrom in interface com.google.protobuf.Message.Builder
      Overrides:
      mergeFrom in class com.google.protobuf.AbstractMessage.Builder<MethodRestrictions.Builder>
    • mergeFrom

    • isInitialized

      public final boolean isInitialized()
      Specified by:
      isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
      Overrides:
      isInitialized in class com.google.protobuf.GeneratedMessageV3.Builder<MethodRestrictions.Builder>
    • mergeFrom

      public MethodRestrictions.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Specified by:
      mergeFrom in interface com.google.protobuf.Message.Builder
      Specified by:
      mergeFrom in interface com.google.protobuf.MessageLite.Builder
      Overrides:
      mergeFrom in class com.google.protobuf.AbstractMessage.Builder<MethodRestrictions.Builder>
      Throws:
      IOException
    • getRequestFieldRestrictionsCount

      public int getRequestFieldRestrictionsCount()
      Description copied from interface: MethodRestrictionsOrBuilder
       Restrictions that apply to request fields of the method.
       Key - field mask like path of the field e.g., foo.bar.baz
       Value - Restrictions map containing the mapping from restriction name to
       the restriction values.
       
      map<string, .envoy.extensions.filters.http.proto_api_scrubber.v3.RestrictionConfig> request_field_restrictions = 1;
      Specified by:
      getRequestFieldRestrictionsCount in interface MethodRestrictionsOrBuilder
    • containsRequestFieldRestrictions

      public boolean containsRequestFieldRestrictions(String key)
       Restrictions that apply to request fields of the method.
       Key - field mask like path of the field e.g., foo.bar.baz
       Value - Restrictions map containing the mapping from restriction name to
       the restriction values.
       
      map<string, .envoy.extensions.filters.http.proto_api_scrubber.v3.RestrictionConfig> request_field_restrictions = 1;
      Specified by:
      containsRequestFieldRestrictions in interface MethodRestrictionsOrBuilder
    • getRequestFieldRestrictions

      @Deprecated public Map<String,RestrictionConfig> getRequestFieldRestrictions()
      Deprecated.
      Specified by:
      getRequestFieldRestrictions in interface MethodRestrictionsOrBuilder
    • getRequestFieldRestrictionsMap

      public Map<String,RestrictionConfig> getRequestFieldRestrictionsMap()
       Restrictions that apply to request fields of the method.
       Key - field mask like path of the field e.g., foo.bar.baz
       Value - Restrictions map containing the mapping from restriction name to
       the restriction values.
       
      map<string, .envoy.extensions.filters.http.proto_api_scrubber.v3.RestrictionConfig> request_field_restrictions = 1;
      Specified by:
      getRequestFieldRestrictionsMap in interface MethodRestrictionsOrBuilder
    • getRequestFieldRestrictionsOrDefault

      public RestrictionConfig getRequestFieldRestrictionsOrDefault(String key, RestrictionConfig defaultValue)
       Restrictions that apply to request fields of the method.
       Key - field mask like path of the field e.g., foo.bar.baz
       Value - Restrictions map containing the mapping from restriction name to
       the restriction values.
       
      map<string, .envoy.extensions.filters.http.proto_api_scrubber.v3.RestrictionConfig> request_field_restrictions = 1;
      Specified by:
      getRequestFieldRestrictionsOrDefault in interface MethodRestrictionsOrBuilder
    • getRequestFieldRestrictionsOrThrow

      public RestrictionConfig getRequestFieldRestrictionsOrThrow(String key)
       Restrictions that apply to request fields of the method.
       Key - field mask like path of the field e.g., foo.bar.baz
       Value - Restrictions map containing the mapping from restriction name to
       the restriction values.
       
      map<string, .envoy.extensions.filters.http.proto_api_scrubber.v3.RestrictionConfig> request_field_restrictions = 1;
      Specified by:
      getRequestFieldRestrictionsOrThrow in interface MethodRestrictionsOrBuilder
    • clearRequestFieldRestrictions

      public MethodRestrictions.Builder clearRequestFieldRestrictions()
    • removeRequestFieldRestrictions

      public MethodRestrictions.Builder removeRequestFieldRestrictions(String key)
       Restrictions that apply to request fields of the method.
       Key - field mask like path of the field e.g., foo.bar.baz
       Value - Restrictions map containing the mapping from restriction name to
       the restriction values.
       
      map<string, .envoy.extensions.filters.http.proto_api_scrubber.v3.RestrictionConfig> request_field_restrictions = 1;
    • getMutableRequestFieldRestrictions

      @Deprecated public Map<String,RestrictionConfig> getMutableRequestFieldRestrictions()
      Deprecated.
      Use alternate mutation accessors instead.
    • putRequestFieldRestrictions

      public MethodRestrictions.Builder putRequestFieldRestrictions(String key, RestrictionConfig value)
       Restrictions that apply to request fields of the method.
       Key - field mask like path of the field e.g., foo.bar.baz
       Value - Restrictions map containing the mapping from restriction name to
       the restriction values.
       
      map<string, .envoy.extensions.filters.http.proto_api_scrubber.v3.RestrictionConfig> request_field_restrictions = 1;
    • putAllRequestFieldRestrictions

      public MethodRestrictions.Builder putAllRequestFieldRestrictions(Map<String,RestrictionConfig> values)
       Restrictions that apply to request fields of the method.
       Key - field mask like path of the field e.g., foo.bar.baz
       Value - Restrictions map containing the mapping from restriction name to
       the restriction values.
       
      map<string, .envoy.extensions.filters.http.proto_api_scrubber.v3.RestrictionConfig> request_field_restrictions = 1;
    • putRequestFieldRestrictionsBuilderIfAbsent

      public RestrictionConfig.Builder putRequestFieldRestrictionsBuilderIfAbsent(String key)
       Restrictions that apply to request fields of the method.
       Key - field mask like path of the field e.g., foo.bar.baz
       Value - Restrictions map containing the mapping from restriction name to
       the restriction values.
       
      map<string, .envoy.extensions.filters.http.proto_api_scrubber.v3.RestrictionConfig> request_field_restrictions = 1;
    • getResponseFieldRestrictionsCount

      public int getResponseFieldRestrictionsCount()
      Description copied from interface: MethodRestrictionsOrBuilder
       Restrictions that apply to response fields of the method.
       Key - field mask like path of the field e.g., foo.bar.baz
       Value - Restrictions map containing the mapping from restriction name to
       the restriction values.
       
      map<string, .envoy.extensions.filters.http.proto_api_scrubber.v3.RestrictionConfig> response_field_restrictions = 2;
      Specified by:
      getResponseFieldRestrictionsCount in interface MethodRestrictionsOrBuilder
    • containsResponseFieldRestrictions

      public boolean containsResponseFieldRestrictions(String key)
       Restrictions that apply to response fields of the method.
       Key - field mask like path of the field e.g., foo.bar.baz
       Value - Restrictions map containing the mapping from restriction name to
       the restriction values.
       
      map<string, .envoy.extensions.filters.http.proto_api_scrubber.v3.RestrictionConfig> response_field_restrictions = 2;
      Specified by:
      containsResponseFieldRestrictions in interface MethodRestrictionsOrBuilder
    • getResponseFieldRestrictions

      @Deprecated public Map<String,RestrictionConfig> getResponseFieldRestrictions()
      Deprecated.
      Specified by:
      getResponseFieldRestrictions in interface MethodRestrictionsOrBuilder
    • getResponseFieldRestrictionsMap

      public Map<String,RestrictionConfig> getResponseFieldRestrictionsMap()
       Restrictions that apply to response fields of the method.
       Key - field mask like path of the field e.g., foo.bar.baz
       Value - Restrictions map containing the mapping from restriction name to
       the restriction values.
       
      map<string, .envoy.extensions.filters.http.proto_api_scrubber.v3.RestrictionConfig> response_field_restrictions = 2;
      Specified by:
      getResponseFieldRestrictionsMap in interface MethodRestrictionsOrBuilder
    • getResponseFieldRestrictionsOrDefault

      public RestrictionConfig getResponseFieldRestrictionsOrDefault(String key, RestrictionConfig defaultValue)
       Restrictions that apply to response fields of the method.
       Key - field mask like path of the field e.g., foo.bar.baz
       Value - Restrictions map containing the mapping from restriction name to
       the restriction values.
       
      map<string, .envoy.extensions.filters.http.proto_api_scrubber.v3.RestrictionConfig> response_field_restrictions = 2;
      Specified by:
      getResponseFieldRestrictionsOrDefault in interface MethodRestrictionsOrBuilder
    • getResponseFieldRestrictionsOrThrow

      public RestrictionConfig getResponseFieldRestrictionsOrThrow(String key)
       Restrictions that apply to response fields of the method.
       Key - field mask like path of the field e.g., foo.bar.baz
       Value - Restrictions map containing the mapping from restriction name to
       the restriction values.
       
      map<string, .envoy.extensions.filters.http.proto_api_scrubber.v3.RestrictionConfig> response_field_restrictions = 2;
      Specified by:
      getResponseFieldRestrictionsOrThrow in interface MethodRestrictionsOrBuilder
    • clearResponseFieldRestrictions

      public MethodRestrictions.Builder clearResponseFieldRestrictions()
    • removeResponseFieldRestrictions

      public MethodRestrictions.Builder removeResponseFieldRestrictions(String key)
       Restrictions that apply to response fields of the method.
       Key - field mask like path of the field e.g., foo.bar.baz
       Value - Restrictions map containing the mapping from restriction name to
       the restriction values.
       
      map<string, .envoy.extensions.filters.http.proto_api_scrubber.v3.RestrictionConfig> response_field_restrictions = 2;
    • getMutableResponseFieldRestrictions

      @Deprecated public Map<String,RestrictionConfig> getMutableResponseFieldRestrictions()
      Deprecated.
      Use alternate mutation accessors instead.
    • putResponseFieldRestrictions

      public MethodRestrictions.Builder putResponseFieldRestrictions(String key, RestrictionConfig value)
       Restrictions that apply to response fields of the method.
       Key - field mask like path of the field e.g., foo.bar.baz
       Value - Restrictions map containing the mapping from restriction name to
       the restriction values.
       
      map<string, .envoy.extensions.filters.http.proto_api_scrubber.v3.RestrictionConfig> response_field_restrictions = 2;
    • putAllResponseFieldRestrictions

      public MethodRestrictions.Builder putAllResponseFieldRestrictions(Map<String,RestrictionConfig> values)
       Restrictions that apply to response fields of the method.
       Key - field mask like path of the field e.g., foo.bar.baz
       Value - Restrictions map containing the mapping from restriction name to
       the restriction values.
       
      map<string, .envoy.extensions.filters.http.proto_api_scrubber.v3.RestrictionConfig> response_field_restrictions = 2;
    • putResponseFieldRestrictionsBuilderIfAbsent

      public RestrictionConfig.Builder putResponseFieldRestrictionsBuilderIfAbsent(String key)
       Restrictions that apply to response fields of the method.
       Key - field mask like path of the field e.g., foo.bar.baz
       Value - Restrictions map containing the mapping from restriction name to
       the restriction values.
       
      map<string, .envoy.extensions.filters.http.proto_api_scrubber.v3.RestrictionConfig> response_field_restrictions = 2;
    • hasMethodRestriction

      public boolean hasMethodRestriction()
       Optional restriction that applies to the entire method. If present, this
       rule takes precedence for the method itself over field-level or
       message-level rules. The 'matcher' within RestrictionConfig will determine
       if the method is denied/scrubbed. If the matcher evaluates to true:
      
       - The request is **denied**, and further processing is stopped.
       - The implementation should generate an immediate error response
         (e.g., an HTTP 403 Forbidden status) and send it to the client.
       
      .envoy.extensions.filters.http.proto_api_scrubber.v3.RestrictionConfig method_restriction = 3;
      Specified by:
      hasMethodRestriction in interface MethodRestrictionsOrBuilder
      Returns:
      Whether the methodRestriction field is set.
    • getMethodRestriction

      public RestrictionConfig getMethodRestriction()
       Optional restriction that applies to the entire method. If present, this
       rule takes precedence for the method itself over field-level or
       message-level rules. The 'matcher' within RestrictionConfig will determine
       if the method is denied/scrubbed. If the matcher evaluates to true:
      
       - The request is **denied**, and further processing is stopped.
       - The implementation should generate an immediate error response
         (e.g., an HTTP 403 Forbidden status) and send it to the client.
       
      .envoy.extensions.filters.http.proto_api_scrubber.v3.RestrictionConfig method_restriction = 3;
      Specified by:
      getMethodRestriction in interface MethodRestrictionsOrBuilder
      Returns:
      The methodRestriction.
    • setMethodRestriction

      public MethodRestrictions.Builder setMethodRestriction(RestrictionConfig value)
       Optional restriction that applies to the entire method. If present, this
       rule takes precedence for the method itself over field-level or
       message-level rules. The 'matcher' within RestrictionConfig will determine
       if the method is denied/scrubbed. If the matcher evaluates to true:
      
       - The request is **denied**, and further processing is stopped.
       - The implementation should generate an immediate error response
         (e.g., an HTTP 403 Forbidden status) and send it to the client.
       
      .envoy.extensions.filters.http.proto_api_scrubber.v3.RestrictionConfig method_restriction = 3;
    • setMethodRestriction

      public MethodRestrictions.Builder setMethodRestriction(RestrictionConfig.Builder builderForValue)
       Optional restriction that applies to the entire method. If present, this
       rule takes precedence for the method itself over field-level or
       message-level rules. The 'matcher' within RestrictionConfig will determine
       if the method is denied/scrubbed. If the matcher evaluates to true:
      
       - The request is **denied**, and further processing is stopped.
       - The implementation should generate an immediate error response
         (e.g., an HTTP 403 Forbidden status) and send it to the client.
       
      .envoy.extensions.filters.http.proto_api_scrubber.v3.RestrictionConfig method_restriction = 3;
    • mergeMethodRestriction

      public MethodRestrictions.Builder mergeMethodRestriction(RestrictionConfig value)
       Optional restriction that applies to the entire method. If present, this
       rule takes precedence for the method itself over field-level or
       message-level rules. The 'matcher' within RestrictionConfig will determine
       if the method is denied/scrubbed. If the matcher evaluates to true:
      
       - The request is **denied**, and further processing is stopped.
       - The implementation should generate an immediate error response
         (e.g., an HTTP 403 Forbidden status) and send it to the client.
       
      .envoy.extensions.filters.http.proto_api_scrubber.v3.RestrictionConfig method_restriction = 3;
    • clearMethodRestriction

      public MethodRestrictions.Builder clearMethodRestriction()
       Optional restriction that applies to the entire method. If present, this
       rule takes precedence for the method itself over field-level or
       message-level rules. The 'matcher' within RestrictionConfig will determine
       if the method is denied/scrubbed. If the matcher evaluates to true:
      
       - The request is **denied**, and further processing is stopped.
       - The implementation should generate an immediate error response
         (e.g., an HTTP 403 Forbidden status) and send it to the client.
       
      .envoy.extensions.filters.http.proto_api_scrubber.v3.RestrictionConfig method_restriction = 3;
    • getMethodRestrictionBuilder

      public RestrictionConfig.Builder getMethodRestrictionBuilder()
       Optional restriction that applies to the entire method. If present, this
       rule takes precedence for the method itself over field-level or
       message-level rules. The 'matcher' within RestrictionConfig will determine
       if the method is denied/scrubbed. If the matcher evaluates to true:
      
       - The request is **denied**, and further processing is stopped.
       - The implementation should generate an immediate error response
         (e.g., an HTTP 403 Forbidden status) and send it to the client.
       
      .envoy.extensions.filters.http.proto_api_scrubber.v3.RestrictionConfig method_restriction = 3;
    • getMethodRestrictionOrBuilder

      public RestrictionConfigOrBuilder getMethodRestrictionOrBuilder()
       Optional restriction that applies to the entire method. If present, this
       rule takes precedence for the method itself over field-level or
       message-level rules. The 'matcher' within RestrictionConfig will determine
       if the method is denied/scrubbed. If the matcher evaluates to true:
      
       - The request is **denied**, and further processing is stopped.
       - The implementation should generate an immediate error response
         (e.g., an HTTP 403 Forbidden status) and send it to the client.
       
      .envoy.extensions.filters.http.proto_api_scrubber.v3.RestrictionConfig method_restriction = 3;
      Specified by:
      getMethodRestrictionOrBuilder in interface MethodRestrictionsOrBuilder
    • setUnknownFields

      public final MethodRestrictions.Builder setUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
      Specified by:
      setUnknownFields in interface com.google.protobuf.Message.Builder
      Overrides:
      setUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<MethodRestrictions.Builder>
    • mergeUnknownFields

      public final MethodRestrictions.Builder mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
      Specified by:
      mergeUnknownFields in interface com.google.protobuf.Message.Builder
      Overrides:
      mergeUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<MethodRestrictions.Builder>