public void MergeFrom(StringMatcher other)
        {
            if (other == null)
            {
                return;
            }
            switch (other.MatchPatternCase)
            {
            case MatchPatternOneofCase.Exact:
                Exact = other.Exact;
                break;

            case MatchPatternOneofCase.Prefix:
                Prefix = other.Prefix;
                break;

            case MatchPatternOneofCase.Suffix:
                Suffix = other.Suffix;
                break;

            case MatchPatternOneofCase.Regex:
                Regex = other.Regex;
                break;

            case MatchPatternOneofCase.SafeRegex:
                if (SafeRegex == null)
                {
                    SafeRegex = new global::Envoy.Type.Matcher.RegexMatcher();
                }
                SafeRegex.MergeFrom(other.SafeRegex);
                break;
            }

            _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
        }
        public void MergeFrom(pb::CodedInputStream input)
        {
            uint tag;

            while ((tag = input.ReadTag()) != 0)
            {
                switch (tag)
                {
                default:
                    _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
                    break;

                case 10: {
                    Exact = input.ReadString();
                    break;
                }

                case 18: {
                    Prefix = input.ReadString();
                    break;
                }

                case 26: {
                    Suffix = input.ReadString();
                    break;
                }

                case 34: {
                    Regex = input.ReadString();
                    break;
                }

                case 42: {
                    global::Envoy.Type.Matcher.RegexMatcher subBuilder = new global::Envoy.Type.Matcher.RegexMatcher();
                    if (matchPatternCase_ == MatchPatternOneofCase.SafeRegex)
                    {
                        subBuilder.MergeFrom(SafeRegex);
                    }
                    input.ReadMessage(subBuilder);
                    SafeRegex = subBuilder;
                    break;
                }
                }
            }
        }