Class StringMatcher.Builder

  • All Implemented Interfaces:
    com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, StringMatcherOrBuilder, Cloneable
    Enclosing class:
    StringMatcher

    public static final class StringMatcher.Builder
    extends com.google.protobuf.GeneratedMessageV3.Builder<StringMatcher.Builder>
    implements StringMatcherOrBuilder
     Specifies the way to match a string.
     [#next-free-field: 7]
     
    Protobuf type envoy.type.matcher.StringMatcher
    • Method Detail

      • getDescriptor

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

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

        public StringMatcher.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<StringMatcher.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<StringMatcher.Builder>
      • getDefaultInstanceForType

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

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

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

        public StringMatcher.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<StringMatcher.Builder>
      • setField

        public StringMatcher.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<StringMatcher.Builder>
      • clearField

        public StringMatcher.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<StringMatcher.Builder>
      • clearOneof

        public StringMatcher.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<StringMatcher.Builder>
      • setRepeatedField

        public StringMatcher.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<StringMatcher.Builder>
      • addRepeatedField

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

        public StringMatcher.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<StringMatcher.Builder>
      • isInitialized

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

        public StringMatcher.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<StringMatcher.Builder>
        Throws:
        IOException
      • hasExact

        public boolean hasExact()
         The input string must match exactly the string specified here.
         Examples:
         * *abc* only matches the value *abc*.
         
        string exact = 1;
        Specified by:
        hasExact in interface StringMatcherOrBuilder
        Returns:
        Whether the exact field is set.
      • getExact

        public String getExact()
         The input string must match exactly the string specified here.
         Examples:
         * *abc* only matches the value *abc*.
         
        string exact = 1;
        Specified by:
        getExact in interface StringMatcherOrBuilder
        Returns:
        The exact.
      • getExactBytes

        public com.google.protobuf.ByteString getExactBytes()
         The input string must match exactly the string specified here.
         Examples:
         * *abc* only matches the value *abc*.
         
        string exact = 1;
        Specified by:
        getExactBytes in interface StringMatcherOrBuilder
        Returns:
        The bytes for exact.
      • setExact

        public StringMatcher.Builder setExact​(String value)
         The input string must match exactly the string specified here.
         Examples:
         * *abc* only matches the value *abc*.
         
        string exact = 1;
        Parameters:
        value - The exact to set.
        Returns:
        This builder for chaining.
      • clearExact

        public StringMatcher.Builder clearExact()
         The input string must match exactly the string specified here.
         Examples:
         * *abc* only matches the value *abc*.
         
        string exact = 1;
        Returns:
        This builder for chaining.
      • setExactBytes

        public StringMatcher.Builder setExactBytes​(com.google.protobuf.ByteString value)
         The input string must match exactly the string specified here.
         Examples:
         * *abc* only matches the value *abc*.
         
        string exact = 1;
        Parameters:
        value - The bytes for exact to set.
        Returns:
        This builder for chaining.
      • hasPrefix

        public boolean hasPrefix()
         The input string must have the prefix specified here.
         Note: empty prefix is not allowed, please use regex instead.
         Examples:
         * *abc* matches the value *abc.xyz*
         
        string prefix = 2 [(.validate.rules) = { ... }
        Specified by:
        hasPrefix in interface StringMatcherOrBuilder
        Returns:
        Whether the prefix field is set.
      • getPrefix

        public String getPrefix()
         The input string must have the prefix specified here.
         Note: empty prefix is not allowed, please use regex instead.
         Examples:
         * *abc* matches the value *abc.xyz*
         
        string prefix = 2 [(.validate.rules) = { ... }
        Specified by:
        getPrefix in interface StringMatcherOrBuilder
        Returns:
        The prefix.
      • getPrefixBytes

        public com.google.protobuf.ByteString getPrefixBytes()
         The input string must have the prefix specified here.
         Note: empty prefix is not allowed, please use regex instead.
         Examples:
         * *abc* matches the value *abc.xyz*
         
        string prefix = 2 [(.validate.rules) = { ... }
        Specified by:
        getPrefixBytes in interface StringMatcherOrBuilder
        Returns:
        The bytes for prefix.
      • setPrefix

        public StringMatcher.Builder setPrefix​(String value)
         The input string must have the prefix specified here.
         Note: empty prefix is not allowed, please use regex instead.
         Examples:
         * *abc* matches the value *abc.xyz*
         
        string prefix = 2 [(.validate.rules) = { ... }
        Parameters:
        value - The prefix to set.
        Returns:
        This builder for chaining.
      • clearPrefix

        public StringMatcher.Builder clearPrefix()
         The input string must have the prefix specified here.
         Note: empty prefix is not allowed, please use regex instead.
         Examples:
         * *abc* matches the value *abc.xyz*
         
        string prefix = 2 [(.validate.rules) = { ... }
        Returns:
        This builder for chaining.
      • setPrefixBytes

        public StringMatcher.Builder setPrefixBytes​(com.google.protobuf.ByteString value)
         The input string must have the prefix specified here.
         Note: empty prefix is not allowed, please use regex instead.
         Examples:
         * *abc* matches the value *abc.xyz*
         
        string prefix = 2 [(.validate.rules) = { ... }
        Parameters:
        value - The bytes for prefix to set.
        Returns:
        This builder for chaining.
      • hasSuffix

        public boolean hasSuffix()
         The input string must have the suffix specified here.
         Note: empty prefix is not allowed, please use regex instead.
         Examples:
         * *abc* matches the value *xyz.abc*
         
        string suffix = 3 [(.validate.rules) = { ... }
        Specified by:
        hasSuffix in interface StringMatcherOrBuilder
        Returns:
        Whether the suffix field is set.
      • getSuffix

        public String getSuffix()
         The input string must have the suffix specified here.
         Note: empty prefix is not allowed, please use regex instead.
         Examples:
         * *abc* matches the value *xyz.abc*
         
        string suffix = 3 [(.validate.rules) = { ... }
        Specified by:
        getSuffix in interface StringMatcherOrBuilder
        Returns:
        The suffix.
      • getSuffixBytes

        public com.google.protobuf.ByteString getSuffixBytes()
         The input string must have the suffix specified here.
         Note: empty prefix is not allowed, please use regex instead.
         Examples:
         * *abc* matches the value *xyz.abc*
         
        string suffix = 3 [(.validate.rules) = { ... }
        Specified by:
        getSuffixBytes in interface StringMatcherOrBuilder
        Returns:
        The bytes for suffix.
      • setSuffix

        public StringMatcher.Builder setSuffix​(String value)
         The input string must have the suffix specified here.
         Note: empty prefix is not allowed, please use regex instead.
         Examples:
         * *abc* matches the value *xyz.abc*
         
        string suffix = 3 [(.validate.rules) = { ... }
        Parameters:
        value - The suffix to set.
        Returns:
        This builder for chaining.
      • clearSuffix

        public StringMatcher.Builder clearSuffix()
         The input string must have the suffix specified here.
         Note: empty prefix is not allowed, please use regex instead.
         Examples:
         * *abc* matches the value *xyz.abc*
         
        string suffix = 3 [(.validate.rules) = { ... }
        Returns:
        This builder for chaining.
      • setSuffixBytes

        public StringMatcher.Builder setSuffixBytes​(com.google.protobuf.ByteString value)
         The input string must have the suffix specified here.
         Note: empty prefix is not allowed, please use regex instead.
         Examples:
         * *abc* matches the value *xyz.abc*
         
        string suffix = 3 [(.validate.rules) = { ... }
        Parameters:
        value - The bytes for suffix to set.
        Returns:
        This builder for chaining.
      • hasRegex

        @Deprecated
        public boolean hasRegex()
        Deprecated.
        envoy.type.matcher.StringMatcher.regex is deprecated. See envoy/type/matcher/string.proto;l=60
         The input string must match the regular expression specified here.
         The regex grammar is defined `here
         <https://en.cppreference.com/w/cpp/regex/ecmascript>`_.
         Examples:
         * The regex ``\d{3}`` matches the value *123*
         * The regex ``\d{3}`` does not match the value *1234*
         * The regex ``\d{3}`` does not match the value *123.456*
         .. attention::
           This field has been deprecated in favor of `safe_regex` as it is not safe for use with
           untrusted input in all cases.
         
        string regex = 4 [deprecated = true, (.validate.rules) = { ... }
        Specified by:
        hasRegex in interface StringMatcherOrBuilder
        Returns:
        Whether the regex field is set.
      • getRegex

        @Deprecated
        public String getRegex()
        Deprecated.
        envoy.type.matcher.StringMatcher.regex is deprecated. See envoy/type/matcher/string.proto;l=60
         The input string must match the regular expression specified here.
         The regex grammar is defined `here
         <https://en.cppreference.com/w/cpp/regex/ecmascript>`_.
         Examples:
         * The regex ``\d{3}`` matches the value *123*
         * The regex ``\d{3}`` does not match the value *1234*
         * The regex ``\d{3}`` does not match the value *123.456*
         .. attention::
           This field has been deprecated in favor of `safe_regex` as it is not safe for use with
           untrusted input in all cases.
         
        string regex = 4 [deprecated = true, (.validate.rules) = { ... }
        Specified by:
        getRegex in interface StringMatcherOrBuilder
        Returns:
        The regex.
      • getRegexBytes

        @Deprecated
        public com.google.protobuf.ByteString getRegexBytes()
        Deprecated.
        envoy.type.matcher.StringMatcher.regex is deprecated. See envoy/type/matcher/string.proto;l=60
         The input string must match the regular expression specified here.
         The regex grammar is defined `here
         <https://en.cppreference.com/w/cpp/regex/ecmascript>`_.
         Examples:
         * The regex ``\d{3}`` matches the value *123*
         * The regex ``\d{3}`` does not match the value *1234*
         * The regex ``\d{3}`` does not match the value *123.456*
         .. attention::
           This field has been deprecated in favor of `safe_regex` as it is not safe for use with
           untrusted input in all cases.
         
        string regex = 4 [deprecated = true, (.validate.rules) = { ... }
        Specified by:
        getRegexBytes in interface StringMatcherOrBuilder
        Returns:
        The bytes for regex.
      • setRegex

        @Deprecated
        public StringMatcher.Builder setRegex​(String value)
        Deprecated.
        envoy.type.matcher.StringMatcher.regex is deprecated. See envoy/type/matcher/string.proto;l=60
         The input string must match the regular expression specified here.
         The regex grammar is defined `here
         <https://en.cppreference.com/w/cpp/regex/ecmascript>`_.
         Examples:
         * The regex ``\d{3}`` matches the value *123*
         * The regex ``\d{3}`` does not match the value *1234*
         * The regex ``\d{3}`` does not match the value *123.456*
         .. attention::
           This field has been deprecated in favor of `safe_regex` as it is not safe for use with
           untrusted input in all cases.
         
        string regex = 4 [deprecated = true, (.validate.rules) = { ... }
        Parameters:
        value - The regex to set.
        Returns:
        This builder for chaining.
      • clearRegex

        @Deprecated
        public StringMatcher.Builder clearRegex()
        Deprecated.
        envoy.type.matcher.StringMatcher.regex is deprecated. See envoy/type/matcher/string.proto;l=60
         The input string must match the regular expression specified here.
         The regex grammar is defined `here
         <https://en.cppreference.com/w/cpp/regex/ecmascript>`_.
         Examples:
         * The regex ``\d{3}`` matches the value *123*
         * The regex ``\d{3}`` does not match the value *1234*
         * The regex ``\d{3}`` does not match the value *123.456*
         .. attention::
           This field has been deprecated in favor of `safe_regex` as it is not safe for use with
           untrusted input in all cases.
         
        string regex = 4 [deprecated = true, (.validate.rules) = { ... }
        Returns:
        This builder for chaining.
      • setRegexBytes

        @Deprecated
        public StringMatcher.Builder setRegexBytes​(com.google.protobuf.ByteString value)
        Deprecated.
        envoy.type.matcher.StringMatcher.regex is deprecated. See envoy/type/matcher/string.proto;l=60
         The input string must match the regular expression specified here.
         The regex grammar is defined `here
         <https://en.cppreference.com/w/cpp/regex/ecmascript>`_.
         Examples:
         * The regex ``\d{3}`` matches the value *123*
         * The regex ``\d{3}`` does not match the value *1234*
         * The regex ``\d{3}`` does not match the value *123.456*
         .. attention::
           This field has been deprecated in favor of `safe_regex` as it is not safe for use with
           untrusted input in all cases.
         
        string regex = 4 [deprecated = true, (.validate.rules) = { ... }
        Parameters:
        value - The bytes for regex to set.
        Returns:
        This builder for chaining.
      • hasSafeRegex

        public boolean hasSafeRegex()
         The input string must match the regular expression specified here.
         
        .envoy.type.matcher.RegexMatcher safe_regex = 5 [(.validate.rules) = { ... }
        Specified by:
        hasSafeRegex in interface StringMatcherOrBuilder
        Returns:
        Whether the safeRegex field is set.
      • getSafeRegex

        public RegexMatcher getSafeRegex()
         The input string must match the regular expression specified here.
         
        .envoy.type.matcher.RegexMatcher safe_regex = 5 [(.validate.rules) = { ... }
        Specified by:
        getSafeRegex in interface StringMatcherOrBuilder
        Returns:
        The safeRegex.
      • setSafeRegex

        public StringMatcher.Builder setSafeRegex​(RegexMatcher value)
         The input string must match the regular expression specified here.
         
        .envoy.type.matcher.RegexMatcher safe_regex = 5 [(.validate.rules) = { ... }
      • setSafeRegex

        public StringMatcher.Builder setSafeRegex​(RegexMatcher.Builder builderForValue)
         The input string must match the regular expression specified here.
         
        .envoy.type.matcher.RegexMatcher safe_regex = 5 [(.validate.rules) = { ... }
      • mergeSafeRegex

        public StringMatcher.Builder mergeSafeRegex​(RegexMatcher value)
         The input string must match the regular expression specified here.
         
        .envoy.type.matcher.RegexMatcher safe_regex = 5 [(.validate.rules) = { ... }
      • clearSafeRegex

        public StringMatcher.Builder clearSafeRegex()
         The input string must match the regular expression specified here.
         
        .envoy.type.matcher.RegexMatcher safe_regex = 5 [(.validate.rules) = { ... }
      • getSafeRegexBuilder

        public RegexMatcher.Builder getSafeRegexBuilder()
         The input string must match the regular expression specified here.
         
        .envoy.type.matcher.RegexMatcher safe_regex = 5 [(.validate.rules) = { ... }
      • getIgnoreCase

        public boolean getIgnoreCase()
         If true, indicates the exact/prefix/suffix matching should be case insensitive. This has no
         effect for the safe_regex match.
         For example, the matcher *data* will match both input string *Data* and *data* if set to true.
         
        bool ignore_case = 6;
        Specified by:
        getIgnoreCase in interface StringMatcherOrBuilder
        Returns:
        The ignoreCase.
      • setIgnoreCase

        public StringMatcher.Builder setIgnoreCase​(boolean value)
         If true, indicates the exact/prefix/suffix matching should be case insensitive. This has no
         effect for the safe_regex match.
         For example, the matcher *data* will match both input string *Data* and *data* if set to true.
         
        bool ignore_case = 6;
        Parameters:
        value - The ignoreCase to set.
        Returns:
        This builder for chaining.
      • clearIgnoreCase

        public StringMatcher.Builder clearIgnoreCase()
         If true, indicates the exact/prefix/suffix matching should be case insensitive. This has no
         effect for the safe_regex match.
         For example, the matcher *data* will match both input string *Data* and *data* if set to true.
         
        bool ignore_case = 6;
        Returns:
        This builder for chaining.
      • setUnknownFields

        public final StringMatcher.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<StringMatcher.Builder>
      • mergeUnknownFields

        public final StringMatcher.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<StringMatcher.Builder>