Class StringMatcher

  • All Implemented Interfaces:
    com.google.protobuf.Message, com.google.protobuf.MessageLite, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, StringMatcherOrBuilder, Serializable

    public final class StringMatcher
    extends com.google.protobuf.GeneratedMessageV3
    implements StringMatcherOrBuilder
     Specifies the way to match a string.
     [#next-free-field: 7]
     
    Protobuf type envoy.type.matcher.StringMatcher
    See Also:
    Serialized Form
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      static class  StringMatcher.Builder
      Specifies the way to match a string.
      static class  StringMatcher.MatchPatternCase  
      • Nested classes/interfaces inherited from class com.google.protobuf.GeneratedMessageV3

        com.google.protobuf.GeneratedMessageV3.BuilderParent, com.google.protobuf.GeneratedMessageV3.ExtendableBuilder<MessageType extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage,​BuilderType extends com.google.protobuf.GeneratedMessageV3.ExtendableBuilder<MessageType,​BuilderType>>, com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageType extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage>, com.google.protobuf.GeneratedMessageV3.ExtendableMessageOrBuilder<MessageType extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage>, com.google.protobuf.GeneratedMessageV3.FieldAccessorTable, com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter
      • Nested classes/interfaces inherited from class com.google.protobuf.AbstractMessageLite

        com.google.protobuf.AbstractMessageLite.InternalOneOfEnum
    • Method Detail

      • newInstance

        protected Object newInstance​(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused)
        Overrides:
        newInstance in class com.google.protobuf.GeneratedMessageV3
      • getUnknownFields

        public final com.google.protobuf.UnknownFieldSet getUnknownFields()
        Specified by:
        getUnknownFields in interface com.google.protobuf.MessageOrBuilder
        Overrides:
        getUnknownFields in class com.google.protobuf.GeneratedMessageV3
      • 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
      • 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.
      • 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.
      • 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.
      • 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.
      • 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.
      • 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.
      • isInitialized

        public final boolean isInitialized()
        Specified by:
        isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
        Overrides:
        isInitialized in class com.google.protobuf.GeneratedMessageV3
      • writeTo

        public void writeTo​(com.google.protobuf.CodedOutputStream output)
                     throws IOException
        Specified by:
        writeTo in interface com.google.protobuf.MessageLite
        Overrides:
        writeTo in class com.google.protobuf.GeneratedMessageV3
        Throws:
        IOException
      • getSerializedSize

        public int getSerializedSize()
        Specified by:
        getSerializedSize in interface com.google.protobuf.MessageLite
        Overrides:
        getSerializedSize in class com.google.protobuf.GeneratedMessageV3
      • equals

        public boolean equals​(Object obj)
        Specified by:
        equals in interface com.google.protobuf.Message
        Overrides:
        equals in class com.google.protobuf.AbstractMessage
      • hashCode

        public int hashCode()
        Specified by:
        hashCode in interface com.google.protobuf.Message
        Overrides:
        hashCode in class com.google.protobuf.AbstractMessage
      • parseFrom

        public static StringMatcher parseFrom​(ByteBuffer data)
                                       throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static StringMatcher parseFrom​(ByteBuffer data,
                                              com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                                       throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static StringMatcher parseFrom​(com.google.protobuf.ByteString data)
                                       throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static StringMatcher parseFrom​(com.google.protobuf.ByteString data,
                                              com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                                       throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static StringMatcher parseFrom​(byte[] data)
                                       throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static StringMatcher parseFrom​(byte[] data,
                                              com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                                       throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static StringMatcher parseFrom​(com.google.protobuf.CodedInputStream input,
                                              com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                                       throws IOException
        Throws:
        IOException
      • newBuilderForType

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

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

        protected StringMatcher.Builder newBuilderForType​(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)
        Specified by:
        newBuilderForType in class com.google.protobuf.GeneratedMessageV3
      • getDefaultInstance

        public static StringMatcher getDefaultInstance()
      • parser

        public static com.google.protobuf.Parser<StringMatcher> parser()
      • getParserForType

        public com.google.protobuf.Parser<StringMatcher> getParserForType()
        Specified by:
        getParserForType in interface com.google.protobuf.Message
        Specified by:
        getParserForType in interface com.google.protobuf.MessageLite
        Overrides:
        getParserForType in class com.google.protobuf.GeneratedMessageV3
      • getDefaultInstanceForType

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