Class RegexMatcher.GoogleRE2.Builder

java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<RegexMatcher.GoogleRE2.Builder>
com.google.protobuf.GeneratedMessage.Builder<RegexMatcher.GoogleRE2.Builder>
io.envoyproxy.envoy.type.matcher.v3.RegexMatcher.GoogleRE2.Builder
All Implemented Interfaces:
com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, RegexMatcher.GoogleRE2OrBuilder, Cloneable
Enclosing class:
RegexMatcher.GoogleRE2

public static final class RegexMatcher.GoogleRE2.Builder extends com.google.protobuf.GeneratedMessage.Builder<RegexMatcher.GoogleRE2.Builder> implements RegexMatcher.GoogleRE2OrBuilder
 Google's `RE2 <https://github.com/google/re2>`_ regex engine. The regex string must adhere to
 the documented `syntax <https://github.com/google/re2/wiki/Syntax>`_. The engine is designed
 to complete execution in linear time as well as limit the amount of memory used.

 Envoy supports program size checking via runtime. The runtime keys ``re2.max_program_size.error_level``
 and ``re2.max_program_size.warn_level`` can be set to integers as the maximum program size or
 complexity that a compiled regex can have before an exception is thrown or a warning is
 logged, respectively. ``re2.max_program_size.error_level`` defaults to 100, and
 ``re2.max_program_size.warn_level`` has no default if unset (will not check/log a warning).

 Envoy emits two stats for tracking the program size of regexes: the histogram ``re2.program_size``,
 which records the program size, and the counter ``re2.exceeded_warn_level``, which is incremented
 each time the program size exceeds the warn level threshold.
 
Protobuf type envoy.type.matcher.v3.RegexMatcher.GoogleRE2
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    private int
     
    private com.google.protobuf.UInt32Value
     
    private com.google.protobuf.SingleFieldBuilder<com.google.protobuf.UInt32Value,com.google.protobuf.UInt32Value.Builder,com.google.protobuf.UInt32ValueOrBuilder>
     
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    private
     
    private
    Builder(com.google.protobuf.AbstractMessage.BuilderParent parent)
     
  • Method Summary

    Modifier and Type
    Method
    Description
     
     
    private void
     
     
    Deprecated.
     
    static final com.google.protobuf.Descriptors.Descriptor
     
    com.google.protobuf.Descriptors.Descriptor
     
    com.google.protobuf.UInt32Value
    Deprecated.
    envoy.type.matcher.v3.RegexMatcher.GoogleRE2.max_program_size is deprecated.
    com.google.protobuf.UInt32Value.Builder
    Deprecated.
    com.google.protobuf.UInt32ValueOrBuilder
    Deprecated.
    boolean
    Deprecated.
    envoy.type.matcher.v3.RegexMatcher.GoogleRE2.max_program_size is deprecated.
    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
     
    private com.google.protobuf.SingleFieldBuilder<com.google.protobuf.UInt32Value,com.google.protobuf.UInt32Value.Builder,com.google.protobuf.UInt32ValueOrBuilder>
    This field controls the RE2 "program size" which is a rough estimate of how complex a compiled regex is to evaluate.
    final boolean
     
    private void
     
    mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
     
    mergeFrom(com.google.protobuf.Message other)
     
     
    mergeMaxProgramSize(com.google.protobuf.UInt32Value value)
    Deprecated.
    setMaxProgramSize(com.google.protobuf.UInt32Value value)
    Deprecated.
    setMaxProgramSize(com.google.protobuf.UInt32Value.Builder builderForValue)
    Deprecated.

    Methods inherited from class com.google.protobuf.GeneratedMessage.Builder

    addRepeatedField, clearField, clearOneof, clone, getAllFields, getField, getFieldBuilder, getOneofFieldDescriptor, getParentForChildren, getRepeatedField, getRepeatedFieldBuilder, getRepeatedFieldCount, getUnknownFields, getUnknownFieldSetBuilder, hasField, hasOneof, internalGetMapField, internalGetMapFieldReflection, internalGetMutableMapField, internalGetMutableMapFieldReflection, isClean, markClean, mergeUnknownFields, mergeUnknownLengthDelimitedField, mergeUnknownVarintField, newBuilderForField, onBuilt, onChanged, parseUnknownField, setField, setRepeatedField, setUnknownFields, setUnknownFieldSetBuilder, setUnknownFieldsProto3

    Methods inherited from class com.google.protobuf.AbstractMessage.Builder

    findInitializationErrors, getInitializationErrorString, internalMergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException, toString

    Methods inherited from class com.google.protobuf.AbstractMessageLite.Builder

    addAll, addAll, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, newUninitializedMessageException

    Methods inherited from class java.lang.Object

    equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    Methods inherited from interface com.google.protobuf.Message.Builder

    mergeDelimitedFrom, mergeDelimitedFrom

    Methods inherited from interface com.google.protobuf.MessageLite.Builder

    mergeFrom

    Methods inherited from interface com.google.protobuf.MessageOrBuilder

    findInitializationErrors, getAllFields, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof
  • Field Details

    • bitField0_

      private int bitField0_
    • maxProgramSize_

      private com.google.protobuf.UInt32Value maxProgramSize_
    • maxProgramSizeBuilder_

      private com.google.protobuf.SingleFieldBuilder<com.google.protobuf.UInt32Value,com.google.protobuf.UInt32Value.Builder,com.google.protobuf.UInt32ValueOrBuilder> maxProgramSizeBuilder_
  • Constructor Details

    • Builder

      private Builder()
    • Builder

      private Builder(com.google.protobuf.AbstractMessage.BuilderParent parent)
  • Method Details

    • getDescriptor

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

      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
      Specified by:
      internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessage.Builder<RegexMatcher.GoogleRE2.Builder>
    • maybeForceBuilderInitialization

      private void maybeForceBuilderInitialization()
    • 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.GeneratedMessage.Builder<RegexMatcher.GoogleRE2.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.GeneratedMessage.Builder<RegexMatcher.GoogleRE2.Builder>
    • getDefaultInstanceForType

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

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

      public RegexMatcher.GoogleRE2 buildPartial()
      Specified by:
      buildPartial in interface com.google.protobuf.Message.Builder
      Specified by:
      buildPartial in interface com.google.protobuf.MessageLite.Builder
    • buildPartial0

      private void buildPartial0(RegexMatcher.GoogleRE2 result)
    • mergeFrom

      public RegexMatcher.GoogleRE2.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<RegexMatcher.GoogleRE2.Builder>
    • mergeFrom

    • isInitialized

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

      public RegexMatcher.GoogleRE2.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<RegexMatcher.GoogleRE2.Builder>
      Throws:
      IOException
    • hasMaxProgramSize

      @Deprecated public boolean hasMaxProgramSize()
      Deprecated.
      envoy.type.matcher.v3.RegexMatcher.GoogleRE2.max_program_size is deprecated. See envoy/type/matcher/v3/regex.proto;l=53
       This field controls the RE2 "program size" which is a rough estimate of how complex a
       compiled regex is to evaluate. A regex that has a program size greater than the configured
       value will fail to compile. In this case, the configured max program size can be increased
       or the regex can be simplified. If not specified, the default is 100.
      
       This field is deprecated; regexp validation should be performed on the management server
       instead of being done by each individual client.
      
       .. note::
      
       Although this field is deprecated, the program size will still be checked against the
       global ``re2.max_program_size.error_level`` runtime value.
       
      .google.protobuf.UInt32Value max_program_size = 1 [deprecated = true, (.envoy.annotations.deprecated_at_minor_version) = "3.0"];
      Specified by:
      hasMaxProgramSize in interface RegexMatcher.GoogleRE2OrBuilder
      Returns:
      Whether the maxProgramSize field is set.
    • getMaxProgramSize

      @Deprecated public com.google.protobuf.UInt32Value getMaxProgramSize()
      Deprecated.
      envoy.type.matcher.v3.RegexMatcher.GoogleRE2.max_program_size is deprecated. See envoy/type/matcher/v3/regex.proto;l=53
       This field controls the RE2 "program size" which is a rough estimate of how complex a
       compiled regex is to evaluate. A regex that has a program size greater than the configured
       value will fail to compile. In this case, the configured max program size can be increased
       or the regex can be simplified. If not specified, the default is 100.
      
       This field is deprecated; regexp validation should be performed on the management server
       instead of being done by each individual client.
      
       .. note::
      
       Although this field is deprecated, the program size will still be checked against the
       global ``re2.max_program_size.error_level`` runtime value.
       
      .google.protobuf.UInt32Value max_program_size = 1 [deprecated = true, (.envoy.annotations.deprecated_at_minor_version) = "3.0"];
      Specified by:
      getMaxProgramSize in interface RegexMatcher.GoogleRE2OrBuilder
      Returns:
      The maxProgramSize.
    • setMaxProgramSize

      @Deprecated public RegexMatcher.GoogleRE2.Builder setMaxProgramSize(com.google.protobuf.UInt32Value value)
      Deprecated.
       This field controls the RE2 "program size" which is a rough estimate of how complex a
       compiled regex is to evaluate. A regex that has a program size greater than the configured
       value will fail to compile. In this case, the configured max program size can be increased
       or the regex can be simplified. If not specified, the default is 100.
      
       This field is deprecated; regexp validation should be performed on the management server
       instead of being done by each individual client.
      
       .. note::
      
       Although this field is deprecated, the program size will still be checked against the
       global ``re2.max_program_size.error_level`` runtime value.
       
      .google.protobuf.UInt32Value max_program_size = 1 [deprecated = true, (.envoy.annotations.deprecated_at_minor_version) = "3.0"];
    • setMaxProgramSize

      @Deprecated public RegexMatcher.GoogleRE2.Builder setMaxProgramSize(com.google.protobuf.UInt32Value.Builder builderForValue)
      Deprecated.
       This field controls the RE2 "program size" which is a rough estimate of how complex a
       compiled regex is to evaluate. A regex that has a program size greater than the configured
       value will fail to compile. In this case, the configured max program size can be increased
       or the regex can be simplified. If not specified, the default is 100.
      
       This field is deprecated; regexp validation should be performed on the management server
       instead of being done by each individual client.
      
       .. note::
      
       Although this field is deprecated, the program size will still be checked against the
       global ``re2.max_program_size.error_level`` runtime value.
       
      .google.protobuf.UInt32Value max_program_size = 1 [deprecated = true, (.envoy.annotations.deprecated_at_minor_version) = "3.0"];
    • mergeMaxProgramSize

      @Deprecated public RegexMatcher.GoogleRE2.Builder mergeMaxProgramSize(com.google.protobuf.UInt32Value value)
      Deprecated.
       This field controls the RE2 "program size" which is a rough estimate of how complex a
       compiled regex is to evaluate. A regex that has a program size greater than the configured
       value will fail to compile. In this case, the configured max program size can be increased
       or the regex can be simplified. If not specified, the default is 100.
      
       This field is deprecated; regexp validation should be performed on the management server
       instead of being done by each individual client.
      
       .. note::
      
       Although this field is deprecated, the program size will still be checked against the
       global ``re2.max_program_size.error_level`` runtime value.
       
      .google.protobuf.UInt32Value max_program_size = 1 [deprecated = true, (.envoy.annotations.deprecated_at_minor_version) = "3.0"];
    • clearMaxProgramSize

      @Deprecated public RegexMatcher.GoogleRE2.Builder clearMaxProgramSize()
      Deprecated.
       This field controls the RE2 "program size" which is a rough estimate of how complex a
       compiled regex is to evaluate. A regex that has a program size greater than the configured
       value will fail to compile. In this case, the configured max program size can be increased
       or the regex can be simplified. If not specified, the default is 100.
      
       This field is deprecated; regexp validation should be performed on the management server
       instead of being done by each individual client.
      
       .. note::
      
       Although this field is deprecated, the program size will still be checked against the
       global ``re2.max_program_size.error_level`` runtime value.
       
      .google.protobuf.UInt32Value max_program_size = 1 [deprecated = true, (.envoy.annotations.deprecated_at_minor_version) = "3.0"];
    • getMaxProgramSizeBuilder

      @Deprecated public com.google.protobuf.UInt32Value.Builder getMaxProgramSizeBuilder()
      Deprecated.
       This field controls the RE2 "program size" which is a rough estimate of how complex a
       compiled regex is to evaluate. A regex that has a program size greater than the configured
       value will fail to compile. In this case, the configured max program size can be increased
       or the regex can be simplified. If not specified, the default is 100.
      
       This field is deprecated; regexp validation should be performed on the management server
       instead of being done by each individual client.
      
       .. note::
      
       Although this field is deprecated, the program size will still be checked against the
       global ``re2.max_program_size.error_level`` runtime value.
       
      .google.protobuf.UInt32Value max_program_size = 1 [deprecated = true, (.envoy.annotations.deprecated_at_minor_version) = "3.0"];
    • getMaxProgramSizeOrBuilder

      @Deprecated public com.google.protobuf.UInt32ValueOrBuilder getMaxProgramSizeOrBuilder()
      Deprecated.
       This field controls the RE2 "program size" which is a rough estimate of how complex a
       compiled regex is to evaluate. A regex that has a program size greater than the configured
       value will fail to compile. In this case, the configured max program size can be increased
       or the regex can be simplified. If not specified, the default is 100.
      
       This field is deprecated; regexp validation should be performed on the management server
       instead of being done by each individual client.
      
       .. note::
      
       Although this field is deprecated, the program size will still be checked against the
       global ``re2.max_program_size.error_level`` runtime value.
       
      .google.protobuf.UInt32Value max_program_size = 1 [deprecated = true, (.envoy.annotations.deprecated_at_minor_version) = "3.0"];
      Specified by:
      getMaxProgramSizeOrBuilder in interface RegexMatcher.GoogleRE2OrBuilder
    • internalGetMaxProgramSizeFieldBuilder

      private com.google.protobuf.SingleFieldBuilder<com.google.protobuf.UInt32Value,com.google.protobuf.UInt32Value.Builder,com.google.protobuf.UInt32ValueOrBuilder> internalGetMaxProgramSizeFieldBuilder()
       This field controls the RE2 "program size" which is a rough estimate of how complex a
       compiled regex is to evaluate. A regex that has a program size greater than the configured
       value will fail to compile. In this case, the configured max program size can be increased
       or the regex can be simplified. If not specified, the default is 100.
      
       This field is deprecated; regexp validation should be performed on the management server
       instead of being done by each individual client.
      
       .. note::
      
       Although this field is deprecated, the program size will still be checked against the
       global ``re2.max_program_size.error_level`` runtime value.
       
      .google.protobuf.UInt32Value max_program_size = 1 [deprecated = true, (.envoy.annotations.deprecated_at_minor_version) = "3.0"];