001
002package com.commercetools.api.predicates.query.message;
003
004import java.util.function.Function;
005
006import com.commercetools.api.predicates.query.*;
007
008public class CustomerGroupSetMessagePayloadQueryBuilderDsl {
009    public CustomerGroupSetMessagePayloadQueryBuilderDsl() {
010    }
011
012    public static CustomerGroupSetMessagePayloadQueryBuilderDsl of() {
013        return new CustomerGroupSetMessagePayloadQueryBuilderDsl();
014    }
015
016    public StringComparisonPredicateBuilder<CustomerGroupSetMessagePayloadQueryBuilderDsl> type() {
017        return new StringComparisonPredicateBuilder<>(
018            BinaryQueryPredicate.of().left(new ConstantQueryPredicate("type")),
019            p -> new CombinationQueryPredicate<>(p, CustomerGroupSetMessagePayloadQueryBuilderDsl::of));
020    }
021
022    public CombinationQueryPredicate<CustomerGroupSetMessagePayloadQueryBuilderDsl> customerGroup(
023            Function<com.commercetools.api.predicates.query.customer_group.CustomerGroupReferenceQueryBuilderDsl, CombinationQueryPredicate<com.commercetools.api.predicates.query.customer_group.CustomerGroupReferenceQueryBuilderDsl>> fn) {
024        return new CombinationQueryPredicate<>(ContainerQueryPredicate.of()
025                .parent(ConstantQueryPredicate.of().constant("customerGroup"))
026                .inner(fn.apply(
027                    com.commercetools.api.predicates.query.customer_group.CustomerGroupReferenceQueryBuilderDsl.of())),
028            CustomerGroupSetMessagePayloadQueryBuilderDsl::of);
029    }
030
031}