// Path: src/main/java/com/github/levin81/daelic/druid/dimension/extractionfn/ExtractionFn.java
// public interface ExtractionFn {
//     String getType();
// }
// 
// Path: src/main/java/com/github/levin81/daelic/util/Properties.java
// public final class Properties {
// 
//     private Properties() {
// 
//     }
// 
//     public static <T> void assertRequired(T property, String errorMessage) {
//         if (property == null) {
//             throw new RequiredPropertyException(errorMessage);
//         }
//     }
// 
//     public static <T, E> void assertRequiredDependency(T property, E dependency, String errorMessage) {
//         if (property != null && dependency == null) {
//             throw new RequiredPropertyException(errorMessage);
//         }
//     }
// 
//     public static <T> void assertValid(T property, Function<T, Boolean> booleanExpression, String errorMessage) {
//         if (!booleanExpression.apply(property)) {
//             throw new InvalidPropertyException(errorMessage);
//         }
//     }
// }


import com.fasterxml.jackson.annotation.JsonInclude;
import com.github.levin81.daelic.druid.dimension.extractionfn.ExtractionFn;
import com.github.levin81.daelic.util.Properties;
package com.github.levin81.daelic.druid.filter;


/**
 * Like filters can be used for basic wildcard searches. They are equivalent to the SQL LIKE operator. Special
 * characters supported are "%" (matches any number of characters) and "_" (matches any one character).
 */
@JsonInclude(JsonInclude.Include.NON_NULL)
public class LikeFilter implements Filter {

    private final String type = "like";

    private String dimension;
    private String pattern;
    private String escape;
    private ExtractionFn extractionFn;

    LikeFilter(String dimension, String pattern, String escape, ExtractionFn extractionFn) {
        Properties.assertRequired(dimension, "Dimension is a required property");
        Properties.assertRequired(pattern, "Pattern is a required property");

        this.dimension = dimension;
        this.pattern = pattern;
// Path: src/main/java/com/github/levin81/daelic/druid/dimension/extractionfn/ExtractionFn.java
// public interface ExtractionFn {
//     String getType();
// }
// 
// Path: src/main/java/com/github/levin81/daelic/util/Properties.java
// public final class Properties {
// 
//     private Properties() {
// 
//     }
// 
//     public static <T> void assertRequired(T property, String errorMessage) {
//         if (property == null) {
//             throw new RequiredPropertyException(errorMessage);
//         }
//     }
// 
//     public static <T, E> void assertRequiredDependency(T property, E dependency, String errorMessage) {
//         if (property != null && dependency == null) {
//             throw new RequiredPropertyException(errorMessage);
//         }
//     }
// 
//     public static <T> void assertValid(T property, Function<T, Boolean> booleanExpression, String errorMessage) {
//         if (!booleanExpression.apply(property)) {
//             throw new InvalidPropertyException(errorMessage);
//         }
//     }
// }


// Path: src/main/java/com/github/levin81/daelic/druid/filter/LikeFilter.java
import com.fasterxml.jackson.annotation.JsonInclude;
import com.github.levin81.daelic.druid.dimension.extractionfn.ExtractionFn;
import com.github.levin81.daelic.util.Properties;

package com.github.levin81.daelic.druid.filter;


/**
 * Like filters can be used for basic wildcard searches. They are equivalent to the SQL LIKE operator. Special
 * characters supported are "%" (matches any number of characters) and "_" (matches any one character).
 */
@JsonInclude(JsonInclude.Include.NON_NULL)
public class LikeFilter implements Filter {

    private final String type = "like";

    private String dimension;
    private String pattern;
    private String escape;
    private ExtractionFn extractionFn;

    LikeFilter(String dimension, String pattern, String escape, ExtractionFn extractionFn) {
        Properties.assertRequired(dimension, "Dimension is a required property");
        Properties.assertRequired(pattern, "Pattern is a required property");

        this.dimension = dimension;
        this.pattern = pattern;
        this.escape = escape;